Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to commit untracked files in bulk using add command?

Abhinav Saxena May 9, 2020

I use ctrl+k and select untracked files, and then ctrl+shift+k to push them in Android Studio for windows.

Say suppose I have uncommitted changes, then I issue following commands to add files to my repository:

$git add * <enter-key>

Then I issue the following command to commit my changes:

$git commit -a <enter-key>

VI editor is opened and to switch to edit mode I type:

:i <enter-key>

I type the description of my commit, press enter, then press escape and then type:

:wq <enter-key>

This commits my changes locally.

Then I use the following command to push my changes to repository:

$git push <enter-key>

My question is when I do my commit changes, some-times I get some newly added files in red color:

$git status <enter-key>

That means I still have some files remaining to be committed.

How to add these files in bulk, I mean using single command rather than using add command separately for each file?

1 answer

0 votes
Abhinav Saxena May 12, 2020

Generally I target folder rather than files and use wild card * to add all the files inside the folder along with the subfolders:

$git add myUntrackedFolder/*

Thats all I can do for now.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events