Skip to content

Instantly share code, notes, and snippets.

@lorinma
Created June 2, 2016 18:25
Show Gist options
  • Save lorinma/cb5b388c11eddcbe0f1601831b265c1d to your computer and use it in GitHub Desktop.
Save lorinma/cb5b388c11eddcbe0f1601831b265c1d to your computer and use it in GitHub Desktop.
go back to the last commit
git reset --hard
remove untracked files
git clean -d
Stop tracking and ignore changes to a file in Git
git rm --cached [path] -r
To prevent git from detecting changes in these files you should also use this command:
git update-index --assume-unchanged [path]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment