git ignore local commits

  • 1 Replies
  • 1436 Views
*

Karen

  • *
  • 17
git ignore local commits
« on: May 22, 2016, 20:36:03 pm »
I made some mistakes in my project and now my branch is ahead of origin/master by 3 commits

Can I remove the local commits without deleting everything and starting from scratch ?

Re: git ignore local commits
« Reply #1 on: May 23, 2016, 19:45:23 pm »
try running
Code
git reset --hard origin/master

this should remove all the commits that are not in origin/master

 

Sitemap 1 2 3 4 5 6 7 8