Why does 'git commit' not save my changes?

前端 未结 12 1592
星月不相逢
星月不相逢 2020-11-29 15:16

I did a git commit -m \"message\" like this:

> git commit -m \"save arezzo files\"
# On branch master
# Changes not staged for commit:
#   (u         


        
12条回答
  •  失恋的感觉
    2020-11-29 15:48

    Maybe an obvious thing, but...

    If you have problem with the index, use git-gui. You get a very good view how the index (staging area) actually works.

    Another source of information that helped me understand the index was Scott Chacons "Getting Git" page 259 and forward.

    I started off using the command line because most documentation only showed that...

    I think git-gui and gitk actually make me work faster, and I got rid of bad habits like "git pull" for example... Now I always fetch first... See what the new changes really are before I merge.

提交回复
热议问题