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 dosyalardan bir tanesini 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 develop
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
modified: hello.html.twig
no changes added to commit (use "git add" and/or "git commit -a")
Kazayla indexlenmesin diye dosya "index.html.twig" listeden kaldırılsın.
inanzzz@inanzzz:~/project$ git checkout -- index.html.twig
inanzzz@inanzzz:~/project$ git status
On branch develop
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: hello.html.twig
no changes added to commit (use "git add" and/or "git commit -a")