Reputation: 13
I've got an issue with git bash.
After modifying files I added on the staging area and then do a commit, the modifictions I made on my files aren't on the commit.
On this commit, files are on the same state that they were when i did a git add
.
If I want to have my modifications on a commit, I have to do a git add
just before comitting.
I'm using Intellij Idea and when I use its UI to do a commit, I don't have this issue. I'm only having this issue when I use git bash, on the terminal.
Upvotes: 0
Views: 79
Reputation: 4633
This is expected behaviour and by design. git add
adds changes that will go into the next commit. If you make changes after running git add
, those will not be in the index and so will not go into the next commit, unless you add those as well before you commit.
See 2.2 Git Basics of Pro Git for more information about how this works.
Upvotes: 1