我想使用git flow完成一个特性,但我得到了一个致命错误:fatal: Index contains uncommited changes. Aborting.
>git --version
git version 1.8.3.msysgit.0
>git flow feature list
* google-oauth
>git branch
develop
* feature/google-oauth
master
>git flow feature finish google-oauth
fatal: Index contains uncommited changes. Aborting.
>git status
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory.
# On branch feature/google-oauth
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app.js发布于 2014-02-01 22:46:48
看起来你需要提交你的更改(如果你想保留它们)...git flow feature finish不会为您执行此操作。
答案很简单:git commit -m "my commit message"应该能解决这个问题。
如果您不想保留更改。您需要按照git status消息中的说明进行操作
使用"
git reset HEAD <file>...“来解除
发布于 2014-02-01 22:56:05
git flow消息不言自明。上面写着
致命:索引包含未提交的更改。正在中止。
它只是说您需要在完成流程之前提交您的更改。因此,如果您想要进行这些更改,请执行以下操作
git add app.js
git commit -m "Finished app.js code for google-oauth feature" //Or some other apt message以防您不想进行这些更改(放弃),您可以使用git stash。
git stash要从stash中取回更改,请使用
git stash applyhttps://stackoverflow.com/questions/21499405
复制相似问题