我在名爲「new」的分支中創建了一些文件,並在其中添加了一些文件。 但是,這些新文件也顯示在master中。在多個分支中顯示的新文件
$ git branch
gh-pages
* master
modify
new
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
scalable/apps/dbeaver.svg
scalable/apps/kazam.svg
scalable/apps/mysql-workbench.svg
nothing added to commit but untracked files present (use "git add" to track)
$ git checkout new
Switched to branch 'new'
$ git status
On branch new
Untracked files:
(use "git add <file>..." to include in what will be committed)
scalable/apps/dbeaver.svg
scalable/apps/kazam.svg
scalable/apps/mysql-workbench.svg
nothing added to commit but untracked files present (use "git add" to track)
這是正常的嗎?
好的,所以工作流應該是''(在分支新)add-> commit-> checkout master-> merge new'', 我是否正確? – BaRud
你是對的。 – axiac
瞭解更多關於[Git基礎知識](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics)。 「三國」部分有一個很好的圖表。 – axiac