子分支和父分支同步自己
child branch and parent branch synching themselves
有一个特征分支 A 是使用 git-flow 从 B 中切出的。
中间没有所有命令的历史记录 运行。
但现在对 A 中的文件所做的任何修改也会显示在 B 中。
git checkout feature/A
echo "test" >> existing_file.txt
git status
M existing_file.txt
git checkout develop
git status
M existing_file.txt
任何人都可以帮助我了解这里发生的事情吗?我从 B 创建的任何新分支都会发生这种情况。
我已经完成了分支 A 与 B 的合并并删除了 A。行为仍然与 B 中其他新创建的分支一致。
git-flow or not,如果两个分支之间的文件相同,则常规git checkout
不会修改正在修改的文件:
Local modifications to the files in the working tree are kept, so that they can be committed to the <branch>
.
另请参阅“Git allowing me to switch branches without committing changes”。
有一个特征分支 A 是使用 git-flow 从 B 中切出的。
中间没有所有命令的历史记录 运行。
但现在对 A 中的文件所做的任何修改也会显示在 B 中。
git checkout feature/A
echo "test" >> existing_file.txt
git status
M existing_file.txt
git checkout develop
git status
M existing_file.txt
任何人都可以帮助我了解这里发生的事情吗?我从 B 创建的任何新分支都会发生这种情况。
我已经完成了分支 A 与 B 的合并并删除了 A。行为仍然与 B 中其他新创建的分支一致。
git-flow or not,如果两个分支之间的文件相同,则常规git checkout
不会修改正在修改的文件:
Local modifications to the files in the working tree are kept, so that they can be committed to the
<branch>
.
另请参阅“Git allowing me to switch branches without committing changes”。