Thursday, June 25, 2015

Override local changes with Git

For all SVN users like me, Git is great but a little bit more complex than all stuffs. Imagine, you want to get code from your remote repo and override your local changes (everything your commited on your local repo). This can be done in two step :
  1. Reset your local repo with last fetched head : git reset --hard FETCH_HEAD
  2. Then update local repo with remote one and merge changes : git pull
Hope that could save your day! 

1 comment:

simashree said...

Thanks for the great information in your blog Selenium Training in Chennai