Skip to content

Instantly share code, notes, and snippets.

@bosky101
Last active September 16, 2023 07:49
Show Gist options
  • Save bosky101/5712226 to your computer and use it in GitHub Desktop.
Save bosky101/5712226 to your computer and use it in GitHub Desktop.
$ git pause <file>
# git pause <file>
# Stops tracking <file> if already in the repo
# Have SomeHeader.h that changes on every developers machine ?
# Want it in the repo, got still want the magic of .gitignore on the file ?
# easy
# git pause SomeHeader.h
# making changes to SomeHeader.h wont be staged, wont show in diff or status. perfect!
# Here's how the alias section in your .gitconfig should look like
[alias]
pause = update-index --assume-unchanged
resume = update-index --no-assume-unchanged
# love these as well!
st = status -s
lg = log --oneline -5
# to undo ( when you acutally want to start committing it again )
# git resume SomeHeader.h
#Note: you'll still be able to merge, but mostly will have to pause/stash/revert changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment