Last active
December 11, 2015 07:09
-
-
Save francois/4564516 to your computer and use it in GitHub Desktop.
Reproduction recipe for [How do you tell git to permanently ignore changes in a file?][1] [1]: http://stackoverflow.com/a/14370990/7355
This file contains hidden or 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
#!/bin/sh | |
set -v | |
set -e | |
rm -rf repro | |
mkdir repro | |
cd repro | |
git init | |
touch a b | |
git add --all | |
git commit --message "initial commit" | |
echo "this change on master" > b | |
git status | |
git update-index --assume-unchanged b | |
git status | |
git checkout -b test | |
git status | |
cat b | |
git checkout master | |
git status | |
cat b |
Author
francois
commented
Jan 18, 2013
@francois This is cool. Thanks. Is there a way that I can get a list of the 'assume-unchanged' files? I may forget which file I 'assume-unchanged' weeks later.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment