14/03/2015 - GIT
Indexlenmiş bir kaç tane dosya var ama, içlerinden bir tanesini committen etkilenmesin diye indexten kaldırmak istiyorsunuz. Dosyanın değişiklikleri olduğu gibi kalıyor. Bu işlem için git reset
komutu kullanılır ama "untracked" dosyaları kapsamaz. Daha fazla bilgi için git reset linkini tıklayın.
inanzzz@inanzzz:~/project$ git status
On branch my-feature-branch
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: file_seven.txt
modified: file_two.txt
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: file_five.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
file_six.txt
inanzzz@inanzzz:~/project$ git reset HEAD file_two.txt
Unstaged changes after reset:
M file_five.txt
M file_two.txt
Göründüğü gibi "file_two.txt" dosyası unindexlenmiş durumda.
inanzzz@inanzzz:~/project$ git status
On branch my-feature-branch
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: file_seven.txt
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: file_five.txt
modified: file_two.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
file_six.txt