【发布时间】:2011-11-15 10:07:29
【问题描述】:
在 master 中,我有一些文件应该更好地放在功能分支中。我想创建这样一个分支并将文件放在那里,同时从 master 中删除它们。
我不关心历史,即不需要从以前的提交中删除文件。当我这样做时
$ git ls-files
stay.txt
move.txt
$ git checkout -b feature
Switched to a new branch 'feature'
$ git checkout master
Switched to branch 'master'
$ git rm move.txt
HEAD 中的情况很像我想要的。但是,当我想将 master 合并到 feature 时,我会遇到问题。我必须处理它还是有针对这种情况的解决方案?
【问题讨论】:
标签: git branch feature-branch