gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Add support for pushing to a different remote branch than pulling (Code Review)

Open mrenouf opened this issue 1 year ago • 0 comments

For workflows involving code review, we push changes to a virtual remote branch. The changes are effectively creating a new remote commit each time, taken as a snapshot and included as a revision in the code review.

Since each push is a new change (and commit sha, which might have a new parent... eg. amended or rebased), the changes are linked up by metadata in the commit message.

In gerrit, if you:

git pull remote main

you'd push like:

git push remote refs/gitbutler/Virtual-Branch-1:/refs/for/main

So all that is needed for this to work smoothly with Gitbutler is adding an optional push target (maybe called "review branch" or something?) .

mrenouf avatar Feb 20 '24 15:02 mrenouf