4 ms·
How would one normally achieve the effect of the git forward-merge in the command line? My IDE usually does that for me, so never really considered it an issue
by maaaats 13y ago
How would one normally achieve the effect of the git forward-merge in the command line?
My IDE usually does that for me, so never really considered it an issue to change branch with an unclean tree.
- freshprince 13y agoWorks only for fast-forward merges: git fetch origin master:master
- cool-RR 13y agoI think you'd have to check out the target branch (stashing any changes if you had them), do `git merge source_branch`, and then check out the original branch you were on, and pop stash if you saved one. Alternatively if the merge is a simple fast-forward you can just do `git push . source:destination`, which is what `git forward-merge` does in that case too.