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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With