I came into coding from the traditional research world (environmental science). I started building models in R and Python, and later moved into scientific computing using Python and now dabbling wi...
From the Bob's local feature branch, he can accomplish all this with just:
git pull --rebase origin feature
I use pull --rebase all the time when I don't want a merge commit every time I pull down from the public branch. Simply replays my local commits on top of the remote head.
Bob can actually do this to fix it:
git checkout -b feature-bob
- creates a new branch from the existing feature branch for Bob, with his changesgit checkout feature
- go back to the original branchgit fetch origin
- fetch changes from remote after the rebasegit reset --hard origin/feature
- resets Bob's currentfeature
branch to be identical with remote'sgit checkout feature-bob
- go back to Bob's branchgit rebase feature
- include your changes into his branchBob now keeps working on his feature branch and just rebases on top of yours. That way you can work on the same feature, but still do your own rebase.
Hello Dalibor,
This solution would fit the "no nice way for him to fix this situation" category in my opinion :)
From the Bob's local
feature
branch, he can accomplish all this with just:git pull --rebase origin feature
I use
pull --rebase
all the time when I don't want a merge commit every time I pull down from the public branch. Simply replays my local commits on top of the remote head.Yeah I was going to mention this in the fetch flow.
It actually makes collaborating with rebase completely acceptable as long as you never merge which I think may work at times too.