I’am really new by to doing work in a team of git environment and facing different issues time to time..
This is an issue that I faced today while did some changes in my local files and try to commit and pull/push…
after commit and also did some random changes. At last I got the message “Your branch is ahead of ‘origin/master’ by 3 commits” while try to pull.
So Finally I decided to reset all my changes with remote origin master and it’s so simple with the following (git reset – – hard origin/master) …
Moyens-MBP:corp moyen$ git reset – – hard origin/master
Where it means….
“throw away all my staged and un-staged changes, forget everything on my current local branch and make it exactly the same as origin/master”