-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locking files in git repository #202
Conversation
hmm wonder if "freeze" or "lock" would maybe be better |
yes, you are right. |
lock sounds good to me |
Faboulus! I wasn't aware about |
This is hugely useful. One suggestion (to echo the above): I'd like to see an unlock to go along with the lock. One question: the update-index docs (https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html) discuss |
To answer my own question, this StackOverflow answer explains the difference. |
One other comment, perhaps "lock" is not the right verb. You're not really "locking" the file (which would imply the file cannot change, but this is not true -- the file most definitely can change), but rather telling Git to stop tracking changes. Perhaps |
Thanks @pzelnip
|
@julionc Willing to proceed? |
Updated cc/ @hemanth |
@julionc Awesome stuff! |
Locking files in git repository.
I love git extras so far—hugely useful! Can someone please explain to me the benefit of locking files in git? |
From what I understand, if you This makes it useful for config files that may be changed often (or left completely untracked, leading to a bunch of files being shown as untracked in |
So this is a feature I'd use for a file already committed to the repo, rather than one I want to ignore (like |
Locking files in git repository.
The way to ignore certain files that are already committed is:
I thought that this shortcut might be useful to exclude/protect files from version control.
Usage: