-4

当我将我的 git 切换到一个分支进行更改时,我突然发现了一个需要修复的错误。我该怎么办?
我是否需要在 Excel 或纸上记录错误,然后在另一个分支中修复它?
如果是这样的话,我认为 git 是愚蠢的。

4

2 回答 2

3

如果我的问题正确,您需要git stash,例如

# I have some uncommited changes!
git stash
# now I have a clean working directory, without the uncommited changes. 
# fix Your bug, commit push, etc.
git stash pop
# now my uncommited changes are back! Keep working on the feature
于 2012-07-17T09:12:24.450 回答
0

如果您只需要在另一个分支中修复它,那么创建一个新的克隆并在那里修复它。

于 2012-07-17T10:14:53.033 回答