3 ms·
I'm certainly aware of reflog and have (thankfully) only had occasion to use it once or twice that I can remember. To my original comment - having to force-pus
by chrisfinazzo 4y ago
I'm certainly aware of reflog and have (thankfully) only had occasion to use it once or twice that I can remember.
To my original comment - having to force-push in order to resolve heads - is there a "correct" way to do this that doesn't feel gross?
- Dylan16807 4y agoYou're going to have to explain your problem in more detail than "resolve a situation with multiple remote heads".
- chrisfinazzo 4y agoTo explain, I'll borrow the solution that I first saw in a Fog Creek presentation from ages ago ("DVCS University")... Essentially, if you have more than one person making changes to the same piece of code, the method for resolving them is: 1) Pull - gets their changes 2) Merge - puts their changes together with yours and you can reorganize them at that point. Note, this was done with Mercurial which doesn't have the concept of a stage, so Pull feels like it has a slightly different meaning when you look at it that way. One [suggestion][1] for Git if you want to achieve the same effect - getting a Fast-Forward at the end - is to Rebase, then Merge last. Part of me knew this, I simply forgot and wanted to get out of this particular hole. [suggestion]: https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase https://www.atlassian.com/git/tutorials/rewriting-history/gi...
- Dylan16807 4y agoThat's the start of a setup, but that's not enough information for me to figure out why you needed a force push. I'm not going to demand you explain more, but if you want to explain more then I'll try to answer the question you had about whether there's a better method. Also Pull is generally a shortcut for "Fetch then Merge", and just getting changes is Fetch.