I use Git instructions in this sequence:
- git add .
- git commit -m "message"
However, I learnt from some tutorial that git commit -am "message" does the same. So I began using it in projects and it worked.
But now when I use commit -am, it doesn't add to staging area and gives this output:
$ git commit -am "added files in repo"
On branch master
Initial commit
Untracked files:
.RData
.Rhistory
CSV.BAT
ExpenseCalculator.R
GenerateCsv.class
GenerateCsv.java
test.csv
nothing added to commit but untracked files present
So I would like to know the concept behind using the two commands.