git commands - snowpuppy/augreality GitHub Wiki

Get Changes From Main Repository

Pull Changes from the main repository. This adds the changes from the main repository to the one in your terminal. These changes won't be on github yet.

 git fetch origin
 git merge origin/master

Put Changes on GitHub

This command syncs the contents of the repository on your local machine with the repository on github.

 git push origin

Prepare Your Repository For Pushing

List the status of your repository to see any untracked changes that you may want to add. Untracked changes won't be committed ever.

 git status

See a list of all commits that have been done for your repository

 git log

Add files to your repository. Multiple files seperated by spaces will add all of the files and or directories to the repository. Using "." for the filename will add all files in the current directory.

 git add <filename>

Similarly you can get rid of a file with the command below.

 git rm <filename>

Commit all changes that git status says are ready to be committed. Committing means that your changes and new files are officially part of the repository. If you created a new file then it must be added before you commit changes. If you want to remove a file, make sure you used "git rm <filename></filename>" to get rid of it.

 git commit -m "what did I commit/why"
⚠️ **GitHub.com Fallback** ⚠️