What happens if I refuse after clicking?

I always hear that this is something scary and something that I should never do. For example, here's what the pull dialog in SourceTree looks like:

enter image description here

So, I'm curious what will happen and how bad it would be if I pushed the changes and then pushed them again and again? And how to fix the repository if I break it this way?

+8
git rebase
source share
2 answers

Nothing will happen, but your next push will not be accepted.

If you do not force a push. It also will not destroy the remote repository, so it is also not so bad.

Things go wrong when you have more people using this repo. Overwriting history can lead to chaos for others who will pull new changes from a remote computer. Especially if they don’t have good git knowledge. There can be different things that can happen in order for a person to drag an overwritten remote branch depending on the state of his local repository.

So, if someone works on function X, and you change the code on which he based his changes, he could at least get completely upset depending on how much of his work you made outdated.

+7
source share

In the script that you specify in SourceTree, SourceTree restores local commits that were not pushed on top of the changes that you pull from the remote.

If you have already made changes before using the THAT option, these changes will not be reset because they are already on the remote control.

The only exception may be if you have several remotes, and pushed the changes to one remote, then pull / rebase from another - this can cause serious problems.

Whether you need to reinstall or not while pulling out is the subject of discussion. I do not recommend this, but it is generally safe. https://developer.atlassian.com/blog/2014/12/pull-request-merge-strategies-the-great-debate/

+1
source share

All Articles