Git Cheatsheet
Git Cheatsheet
com
From scratch -- Create a new local repository List all local branches
$ git init [project name] $ git branch
Download from an existing repository List all branches, local and remote
$ git clone my_url $ git branch -av
List new or modified files not yet committed Create a new branch called new_branch
$ git status $ git branch new_branch
Show the changes to files not yet staged Delete the branch called my_branch
$ git diff $ git branch -d my_branch
www.hostinger.com
Get the latest changes from origin (no merge) When in doubt, use git help
$ git fetch $ git command --help
Fetch the latest changes from origin and merge Or visit https://training.github.com/
$ git pull for official GitHub training.
www.hostinger.com