This summer I started to use github as a repository for my code, and I wanted to document instructions for updating a repository. This is assuming you already have created the repository, and have the appropriate .git folder on your machine, the local repository!

Get the status of your local repository

# Shows files that you have in folder, which ones are added (A) or modified (M)
git status -s

Set up your credentials

# credentials
git config --global 'My Name'
git config --global 'myemail.address'

Adding new files to your local repository:

git add file1 file2

Commit files to the local repository

# commits the files to your local repository -
# this will bring up a text document and you can
# uncomment the files that you want to commit, save, and exit.
git commit -a

Send to github repository

git push origin master

Suggested Citation:
Sochat, Vanessa. "GIT Basic Commands to Update Repository." @vsoch (blog), 24 Sep 2011, (accessed 12 May 24).