我有两个分支,master并且feature.
我完成了工作feature,所以这个分支有很多提交,但我不想按原样发布它。我想创建一个名为的分支feature_clean,其中包含所有修改feature但具有更好的提交。
我尝试了以下方法:
git checkout -b feature_clean master
git checkout feature
git rebase --interactive feature_clean
# reorganize commits etc, save and close editor
, 这创建feature_clean正确但它也修改了feature. 事实上,两个分支是平等的。
我做错什么了?我现在想保持feature原样(我会在经过feature_clean适当的测试和批准后删除它)。