Git configuration settings

you can specify Git configuration settings with the git config command. One of the first things you did was set up your name and email address:

$ git config –global “Moyen Uddin”
$ git config –global

useful link:


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”




How to ignore error on git pull with local changes would be overwritten by merge?

I have changed some files on my local machine, pushed them to a remote repository, and now I’m trying to pull the changes to the server and I get the message;

error: Your local changes to the following files would be overwritten by merge:

Please, commit your changes or stash them before you can merge.

So What I simply did that …..

Moyens-MBP:~ moyen$ git checkout wp-content/plugins/pluginname/file.php
Moyens-MBP:~ moyen$ git commit -m “merged”
Moyens-MBP:~ moyen$ git pull
Moyens-MBP:~ moyen$ git push origin master

and this makes override the local file with the remote one (git checkout filepath) and deploys the other changes.

Helpful Link: