G
G
g00d2011-07-20 15:41:42
git
g00d, 2011-07-20 15:41:42

Git and merge, how?

Situation:
1. made a branch from the master (git checkout -b blabla)
2. committed the changes (git commit -am 'fixes blabla'
3. moved to the master (git checkout master)
4. pulled everything new from the server (git pull)
5 . smergil changes (git merge blabla)
6. uploaded the branch to the server (git push)
did not delete it... a couple of weeks have passed. There was a bug in that feature.
(now this branch is already apparently very different from the master...)
question: is it worth it? "merge" updates from the master into it (for these two weeks)?
Or, you can switch to it, fix the bug and repeat from point 2?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Fedorov, 2011-07-20
@datacompboy

# move to our branch
git checkout branch
# move it to the current state
git reset --hard master
# work on
yes, it will continue from the current master. and in the history of the master there will be two plums of this branch. as for me - so it is correct.
and about the sequence above - between 4 and 5 I do
4. took everything new from the server (git pull)
# rearranged the history of the branch on top of the new state of the master
git checkout blabla
git rebase master
git checkout master
5. smergil changes (git merge blabla)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question