18/11/2014 - GIT
Varsayalım ki çalışma listesinde git add
komutu ile indexlenmeyi bekleyen bir kaç tane dosya var, ve de daha sonrada commit işlemi yapılacak ama siz bu dosyaların hepsini iptal etmek istiyorsunuz. İşte bu işlem için git checkout -- .
kullanılır. Daha fazla bilgi için git checkout 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)
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_one.txt
modified: file_two.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
file_seven.txt
file_six.txt
Gördüğümüz gibi "file_one.txt" ve "file_two.txt" listeden kaldırıldı.
inanzzz@inanzzz:~/project$ git checkout -- .
inanzzz@inanzzz:~/project$ git status
On branch my-feature-branch
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: file_two.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
file_seven.txt
file_six.txt