Your branch is ahead of ‘origin/master’ by 3 commits

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”

 

link:http://stackoverflow.com/questions/15432052/what-is-the-meaning-of-git-reset-hard-origin-master

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s