12

After a couple of days working on the task I decided to take a look at what's been done with git status from Git Bash.

Some files are in Changes to be committed list, some are in Changes not staged for commit. Interesting thing is, I've never added anything explicitly to the staging area. Never! How is that possible that some of the files ended up there?

Apart from just coding I did git pull once and git stash/stash pop. That's it.

Any ideas?

yuranos
  • 8,799
  • 9
  • 56
  • 65
  • Did you "add" new files in the intellij project? If so, did they immediately turn red, or green? since in the later case there is a setting which automatically adds newly created files to VCS. – vikingsteve May 27 '15 at 18:52
  • I did add 1 new file. But it's the only one I don't have questions about, because it appears in both sections: in staged as a "new file" and in unstaged because I edited it after the initial creation. All other files are the old ones. – yuranos May 28 '15 at 07:46

2 Answers2

9

You may have enabled/disabled the version control silently mode in IDEA:

File -> Settings -> Version control -> Confirmation

Related post.

enter image description here

Community
  • 1
  • 1
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
6

The Git integration in IntelliJ IDEA stages files when the "Add" action is performed. Normally this happens when a new file is added to Git, but you can also invoke "Add" on an existing file, in which case its current contents will be staged.

yole
  • 92,896
  • 20
  • 260
  • 197
  • 2
    What about changes to already added files? I want to skip the `git add .` phase by clicking `commit` in the GUI – Gulzar Dec 02 '21 at 13:01