MrGuim
MrGuim

Reputation: 3

Git - recover a commit

For a project, I git (and github) on a lot of pc. On one, I first checkout to get old code and I commit and push to github with respectively git commit -a -m "Message" and git push --force. I see that it work but now on an other pc when i want to get the last commit, I can't get the modifications. I try to use git log but the commit isn't there and I try to see it with git reflog but it doesn't work. How can I get it back ?

Upvotes: 0

Views: 42

Answers (2)

Marlon Adarme
Marlon Adarme

Reputation: 375

Run git fetch and after git pull. Hope it works.

Upvotes: 1

Chandan Kumar
Chandan Kumar

Reputation: 889

RUN git fetch git checkout branch-name

Upvotes: 0

Related Questions