Last active
September 16, 2023 07:49
-
-
Save bosky101/5712226 to your computer and use it in GitHub Desktop.
$ git pause <file>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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