Git konusunda gerçekten yeniyim ve git'in neden başka bir dalda bir dalda değiştirdiğimi göstermeye devam ettiğini anlamaya çalışıyorum, git checkout'u dallar arasında geçiş yapmak için çalıştırdığımda İlk önce git add kullanmamaya çalıştım ve çalışmadım. Ancak, git add kullanmayı denedim, ancak sorunu çözmedim. Henüz git commit kullanmıyorum.
Temelde yaptığım şey bu:
$ git clone <a_repository>
$ git branch
* master
$ git branch testing
$ git checkout testing
...edit a file, add a new one, delete...
$ git status
# On branch testing
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: file1.txt
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# file2.txt
no changes added to commit (use "git add" and/or "git commit -a")
$ git branch
master
* testing
$ git checkout master
D file1.txt
Switched to branch 'master'
$ git status
# On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: file1.txt
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# file2.txt
no changes added to commit (use "git add" and/or "git commit -a")
Dalları kullanırken bir dalda ne yaparsanız yapın diğer dallara görünmez diye düşündüm. Şube yaratmanın nedeni bu değil mi?
"Git add" kullanmayı denedim, ancak değişiklikler her iki dalda da görülebilir. Bunu önlemek için dallar arasında geçiş yapmadan önce "git commit" çalıştırmam gerekir mi?