Git thread: fatal: index contains unspecified changes. Aborting

I want to end a function using a git stream, but I get a fatal error: 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
+5
source share
3 answers

It looks like you need to commit your changes (if you want to save them) ... git flow feature finishdoes not do this for you.

Simple: git commit -m "my commit message"should do the trick.

If you do not want to save the changes. You will need to follow the instructions in the message git statusand

use " git reset HEAD <file>..." to uninstall

+7
source

git flowthe message goes without saying. It says:

Fatal: The index contains uncommitted changes. Aborting

, , . , ,

git add app.js
git commit -m "Finished app.js code for google-oauth feature" //Or some other apt message

, (), git stash.

git stash

,

git stash apply
+1

In addition to making changes, make sure that you perform the finish function from the root directory and not from a subdirectory.

0
source

Source: https://habr.com/ru/post/1524845/


All Articles