Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 752 Bytes

cheatsheet.md

File metadata and controls

31 lines (21 loc) · 752 Bytes

Git Command Cheat Sheet

Cloning your remote directory
	git clone <remote directory>
Checking that status of your local repository - shows changed but not added files in red
	git status
Creating a new branch for you to work on
	git branch <new branch name>
See all branches in your remote repository
	git branch -a
Moving onto a branch
	git checkout <branch name>
Deleting a branch
	git branch -d <branch name>
Moving files while preserving git history
	git mv <source> <destination>
To add one file
	git add <Filename>
Creates a branch, and moves you onto it AT THE SAME TIME
	git checkout -b <new branch name>
This command is used to check the commit history.
	git log