Reputation: 88
I'm trying to commit my changes to the git
but i have this message saying Changes not staged for commit:
. Before, the command that I always used is git add-commit -m "message"
but now i don't know what syntax used now in this version of git which is git version 2.15.0. I looked for the documentation in the git
website but no luck. Can someone help me with this?
Upvotes: 0
Views: 7135
Reputation: 38552
Break down the steps to properly understand what is happening inside the hood.
Step 1:
## Add your modified files to stage area using,
git add -u
Step 2:
## Commit/Take snapshot your modified files with message on the staging area
git commit -m "Add php and bash file payroll"
Step 3:
## Push your changes to remote branch using,
git push
Upvotes: 1
Reputation: 8966
Either 1) Use the -a
flag for auto add:
git commit -am "your message"
or 2)
git add --all
then
git commit -m "Your message"
Upvotes: 4