Okay, This might be a silly question, but I am new to git, and getting confused a lot.
I have made some files on IntelliJ and now when I run git status
in my IntelliJ terminal I get this:
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file x
new file: file y
new file: file z
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
Modified: file x
Modified: file y
Modified: file z
Untracked files:
(use "git add <file>..." to include in what will be committed)
file a
file b
I want to stage and commit the file x, file y, file z and do not want to stage the file a and file b.
I know git add .
will stage all tracked and untracked files. Can something like git add -u
do the job?
Note: There are a lot of files and I don't want to individually add them all.