[Git Command] Git pull and override local modification

This article is not a tutorial of git command, there are already so many articles explained the usage of git.

So it is only a sticky note for me, only !

To pull a project, the command is pull or fetch, and to override local change, the option is –hard.

Command :

git fetch --all
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