Skip to content

Instantly share code, notes, and snippets.

@francois
Last active December 11, 2015 07:09
Show Gist options
  • Save francois/4564516 to your computer and use it in GitHub Desktop.
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
#!/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
@shrekuu
Copy link

shrekuu commented Aug 30, 2015

@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