Committing Staged Changes
It's always a good idea to check your staging area before commiting it to the repository. You can do that by running git status.
To make a commit out of staged changes and then put that commit into the repository, you can use the commit sub command. The commit sub command will need a message, which will act as a brief description of what changed since the previous commit. If you don't include the message in the command itself, you will instead be dropped into a terminal based text editor to write one. To just make a commit that has a message included in the command, you can use the -m flag, like so:
git commit -m "message"
Make sure your messages are accurate and concise. Fine details can be seen by just checking the contents of the commit, so commit messages serve best when giving insight as to the reason for those changes. For instance "Changed the if statement to check for x" is true and descriptive, but very redundant. Something like "Stop y from breaking when x is to large" will give background into why that change has happened, which helps when reviewing commits later. If you are out of ideas, commit messages are the best place to describe intent and purpose, not content (though those will overlap, of course).
No comments to display
No comments to display