Git Command Line Snippets: Add, Commit and Push Changes

GitHubThis post is part of the series on Git Command Line Snippets where I am taking a look at performing actions on GitHub using the git command line.

There are three steps required to add your changes to a GitHub repository:

  1. Add
  2. Commit
  3. Push

Fistly, you need to add your changes; it is possible to only add specific files, but in my case I always want to add everything; this command will add all changes including added changed or deleted files and folders:

git add --all

Once you have added the changes, you need to commit them; you can supply a commit message, but this should be a maximum of 55 characters.

git commit -m "Release for x and y"

Once you have committed the changes, you need to push them to GitHub for them to appear in the repository:

git push

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *