Git Cheat Sheet - Simple Cheat Sheet
Git Cheat Sheet - Simple Cheat Sheet
Git Cheat Sheet - Simple Cheat Sheet
com
Git is a distributed version control system for tracking changes in source code
during software development. Git Cheat Sheet is a cheat-sheet for creating web
apps with the Laravel framework using the PHP language. Most of the summaries
and examples are based on the official documentation.
set a name that is identifiable for credit when review version history
set an email address that will be associated with each history marker
set automatic command line coloring for Git for easy reviewing
Up ↑
https://simplecheatsheet.com/tag/git-cheat-sheet/ 1/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
git init
git status
show modified files in working directory, staged for your next commit
git diff
Up ↑
https://simplecheatsheet.com/tag/git-cheat-sheet/ 2/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
git branch
list your branches. a * will appear next to the currently active branch
git checkout
switch to another branch and check it out into your working directory
git log
git log
https://simplecheatsheet.com/tag/git-cheat-sheet/ 3/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
git pull
fetch and merge any commits from the tracking remote branch
git rm [file]
Up ↑
https://simplecheatsheet.com/tag/git-cheat-sheet/ 4/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
delete the file from project and stage the removal for commit
show all commit logs with indication of any paths that moved
logs/
*.notes
pattern*/
Save a file with desired patterns as .gitignore with either direct string
git stash
https://simplecheatsheet.com/tag/git-cheat-sheet/ 5/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
Table of contents
https://simplecheatsheet.com/tag/git-cheat-sheet/ 6/7
8/3/22, 3:06 AM Git Cheat Sheet - Simple Cheat Sheet | simplecheatsheet.com
cheat-sheet/>
©
2022 Simple Cheat Sheet < https://simplecheatsheet.com/>
Privacy Policy < https://simplecheatsheet.com/privacy-policy/>
Up ↑
https://simplecheatsheet.com/tag/git-cheat-sheet/ 7/7