Reputation: 2070
After I pulled from the remote repository, I got the following messages:
- branch develop -> FETCH_HEAD First, rewinding head to replay your work on top of it... Fast-forwarded my_topic to f05183b231e55864ae8d99db9456167af3413b6a
So how could I rewind my work on top of FETCH_HEAD?
Upvotes: 4
Views: 15766
Reputation: 66198
The message is a confirmation of what git has successfully done - it isn't asking you to do anything.
if you want to check that a branch contains a particular commit:
git branch --contains <hash>
It's not related to the question as asked but if you want to put commits ontop of others - that's where git rebase
comes in - to re-order commits.
e.g.
git checkout master
...
git commit -vam "one"
...
git commit -vam "two"
...
git checkout somebranch
...
git commit -vam "three"
...
git commit -vam "four"
Commits one+two and three+four are in 2 separate branches. to get them in order:
git rebase master
Alternatively, you can apply a single commit simply by doing:
git cherry-pick <hash>
You can use git reflog
to find the hash for any commit that you think is missing.
Upvotes: 9
Reputation: 569
Did you add and commit everything on your own side first? To check that, do a
git status
If you didn't, you should always do that first and then try pulling again.
Upvotes: 1