summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-06-22 11:36:27 +0300
committerYuval Adam <yuv.adm@gmail.com>2011-06-22 11:36:27 +0300
commit1e0de10931edb4617fe671b19b4b80b57e6cd319 (patch)
tree8cb71978077493bb76b3542f2ea9f7d6a2e33393
parent518aa6a8a565aef83eaf8493d8a5979b0625fbc7 (diff)
added info on how to make git ignore indexed filesHEADgh-pages
-rw-r--r--_posts/2008-02-03-ignore-files.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/_posts/2008-02-03-ignore-files.markdown b/_posts/2008-02-03-ignore-files.markdown
index aaa18e1..b440a95 100644
--- a/_posts/2008-02-03-ignore-files.markdown
+++ b/_posts/2008-02-03-ignore-files.markdown
@@ -65,6 +65,11 @@ Repo exclude
Local per-repo rules can be added to the `.git/info/exclude` file in your repo. These rules *are not committed* with the repo so they are not shared with others. This method can be used for locally-generated files that you don't expect other users to generate, like files created by your editor.
+Ignoring versioned files
+------------------------
+
+Some files in a repository, which are versioned (i.e. not git-ignored), are often changed, but rarely committed. Usually these are various local configuration files that are edited, but should never be committed upstream. Git allows a user to ignore those files by assuming they are unchanged. This is done by running the `git update-index --assume-unchanged path/to/file.txt` command. Once marking a file as such, git will completely ignore any changes on that file, they will not show up when running `git status` or `git diff`, nor will they ever be committed. To make git track the file again, simply run `git update-index --no-assume-unchanged path/to/file.txt`.
+
Links
-----