git commit -m vs. git commit -am

I would suggest, if you only changed one file then you might do something like this:

git add "Your_file.txt"
git commit -m "added a new feature in a file"
git push 

Or if you changed multiple files then you could do something like this:

git add .
git commit -m "some files changed"
git push

Similarly, you could add and commit all the files on one line with this command:

git commit -am "added a new feature some files changed"
git push

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s