02/12/2014 - GIT
Varsayalım ki tracked ve untracked bölümlerinde indexlenmeyi bekleyen bir çok dosya var ama, siz bir hamlede sadece tracked dosyaları indexlemek istiyorsunuz. Böylece bir sonraki commit işleminde untracked dosyaların hepsi önemsenmemiş olur. İşte bu durumda git add -u
kullanılır. Daha fazla bilgi için git add linkini tıklayın.
inanzzz@inanzzz:~/project$ git status
On branch develop
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: services.yml
modified: index.html.twig
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt
no changes added to commit (use "git add" and/or "git commit -a")
inanzzz@inanzzz:~/project$ git add -u
inanzzz@inanzzz:~/project$ git status
On branch develop
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: services.yml
modified: index.html.twig
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt
inanzzz@inanzzz:~/project$ git commit -m 'Just commit indexed/tracked'
[develop 31796e2] Just commit indexed/tracked
2 files changed, 1 insertion(+), 4 deletions(-)
delete mode 100644 services.yml
inanzzz@inanzzz:~/project$ git status
On branch develop
Untracked files:
(use "git add <file>..." to include in what will be committed)
new_file.txt
nothing added to commit but untracked files present (use "git add" to track)