Upstream Integration
Handle upstream commits and merge them into your virtual branches when collaborators push to the same remote branch.
Sometimes you work on a branch and someone else pushes to the same upstream branch. Often you won't know this until you try to push and Git tells you something like this:

In this scenario, GitButler gives you some nice tooling to help you know when this happens as early as possible and help you deal with it easily.
If someone else has pushed to a branch that you're working on, you will see the upstream commits without having to integrate them. You can look at the commits without having to merge them into your branch or rebase your work on top of them.

When you decide that you do want to integrate the changes, you have two options - rebase or interactively integrate.
Rebase the changes
If you select "Rebase upstream changes", it will do the equivalent of a git pull --rebase
which rebases the commits you have locally on top of the ones that the other person has pushed, so you end up with a state like this:

Now you can push your commit back upstream without a force push. Easy peasy.
Interactively integrate the changes
However, let's say that you want to do something more complex. Maybe the other implemented the same thing that you did and you want to drop one of them or one of yours, or squash commits together or reorder them. In any of these cases, you can choose the "Interactive integration" option and you get something that looks like this:

Here you can reorder commits however you want, you can choose to skip some of them, you can squash some of them down, etc. Just make the commits look however you prefer and then hit the "Integrate changes" button and push your final result back to the server.
Last updated on