Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Created February 3, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopezjurip/618b053b9ab1f948f1b2 to your computer and use it in GitHub Desktop.
Save lopezjurip/618b053b9ab1f948f1b2 to your computer and use it in GitHub Desktop.
Commit file and stop tracking
// Lets say we have a file with path 'Project/Private/APIKEYS.txt'
git add Project/Private/APIKEYS.txt
git commit -m "added empty APIKEY file"
git push origin master
// Stop tracking
git update-index --assume-unchanged Project/Private/APIKEYS.txt
// Track again
git update-index --no-assume-unchanged Project/Private/APIKEYS.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment