我在回购里面。并试图编译一个软件,但失败了。我又试了一次,发现了这个:
$ git-buildpackage --git-ignore-branch
gbp:error: You have uncommitted changes in your source tree:
gbp:error: On branch experimental
Your branch is up-to-date with 'origin/experimental'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: examples/Makefile.am
no changes added to commit (use "git add" and/or "git commit -a")
gbp:error: Use --git-ignore-new to ignore.然后我就这样做了:
$git clean -f 并再次尝试,但仍然得到相同的修改后的示例/Makefile.am错误,为什么?为什么它不清理它,或者把它放回原始状态呢?
发布于 2015-01-20 03:11:18
构建过程似乎修改了被跟踪的文件examples/Makefile.am。
命令git clean -f仅清除未跟踪的文件。它不会将修改过的文件恢复到它们在存储库中的最后记录状态。要执行后一种操作,请使用
git reset --hard HEAD删除所有本地更改。(当心!它将删除您所做的所有更改。)
https://stackoverflow.com/questions/28031805
复制相似问题