Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Intellij Idea automatically stage changes

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?

like image 976
yuranos Avatar asked May 27 '15 16:05

yuranos


People also ask

How do I enable staging in IntelliJ?

You can use Find Actions which is ⌘⇧A (macOS), or Ctrl+Shift+A (Windows/Linux) and then search for 'Git Staging' to enable Git Staging instead of IntelliJ IDEA Changelists.

Do staged changes get committed?

01 Adding changes html have been staged. This means that git knows about the change, but it is not permanent in the repository. The next commit will include the changes staged. Should you decide not to commit the change, the status command will remind you that you can use the git reset command to unstage these changes.


2 Answers

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

File -> Settings -> Version control -> Confirmation

Related post.

enter image description here

like image 165
AlikElzin-kilaka Avatar answered Oct 06 '22 09:10

AlikElzin-kilaka


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.

like image 28
yole Avatar answered Oct 06 '22 09:10

yole