02/12/2014 - GIT
Bir dosyada değişiklik yaptınız ve o dosya "tracked" listesinde görünüyor ama siz o dosyayı kesinlikle commit etmek istemiyorsunuz. Kısacası git add
komutu ile indexlemek istemiyorsunuz. Bu işlem için git update-index --assume-unchanged
komutunu kullanırız. Daha fazla bilgi için git update-index linkini tıklayın.
inanzzz@inanzzz:~/project$ git status
On branch develop
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: another_file.html
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: index.html.twig
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt
Çalışma klasörünün hafızasını "index.html.twig" dosasını takip etmememesi için yeniliyoruz.
inanzzz@inanzzz:~/project$ git update-index --assume-unchanged index.html.twig
Aşağıda göründüğü gibi "index.html.twig" dosyası artık takip edilmiyor.
inanzzz@inanzzz:~/project$ git status
On branch develop
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: another_file.html
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt
Fikrimiz değişti ve dosyayı listeye geri almak istiyoruz.
inanzzz@inanzzz:~/project$ git update-index --no-assume-unchanged index.html.twig
inanzzz@inanzzz:~/project$ git status
On branch develop
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: another_file.html
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: index.html.twig
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt