Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1 KB

readme.md

File metadata and controls

41 lines (24 loc) · 1 KB

Cheat Sheet

Whenever you're confused about git, come read this cheat sheet. Remember that all git commands can be run with the --help option. For example:

$ git branch --help or $git log --help

Essential Git Commands

####Create a new git repository $ git init - Create a new, local repository

Repo Status

$ git status - Check the status of your current repository and see which files have changed.

$ git diff - Fill Me Out

Repo History

$ git log - Fill Me Out

$ git log --oneline --decorate --color --graph --all - Fill Me Out

$ git log -p [filename] Fill Me Out

Stage files to commit

$ git add <filename> - Fill Me Out

$ git add -A - Fill Me Out

Commit changes in staged files

$ git commit -m "<commit message>" - Fill Me Out

Branching

$ git branch <branch name> - Fill Me Out

$ git branch - Fill Me Out

$ git checkout <branch name> - Fill Me Out

Merging

$ git merge <branch name> - Fill Me Out