By Levi Blodgett
Light green text means replace with your own information.
Hover over
Copied!
me for more information, click the button to copy this to clipboard! ->
git config --global user.email 'email_address@example.com'
Copied!
git config --global user.name 'your username'
Copied!
cd directory1/directory2/myApplication
Copied! or just right-click on the folder and click "Git Bash Here"
git init
Copied!
git remote add origin repository-url
Copied!
git add .; git commit -m "Init repo"; git push --set-upstream origin master
Copied!
git add filename.extension
Copied!
git add .
Copied!
git commit -m 'Type a <50 character description here'
Copied!
-a flag also automatically stages files that have been modified and deleted, but new files you have not told Git about are not affected.
git push -u origin master
Copied!
git branch
Copied! to list all the branches for the project on your local machinegit branch branch_name
Copied!
git checkout branch_name
Copied!
git merge branch_name
Copied!
git branch -d branch_name
Copied!
git push origin --delete branch_name
Copied!
git checkout -b branch_name
Copied!
git clone https://github.com/username/repository-name.git"
Copied!
git pull
Copied!
git push --set-upstream origin branch_name
Copied!
git stash filename.extension
Copied!
git stash apply filename.extension
Copied!
git pull
Copied!
git pull origin branch_name
Copied!
git status
Copied!
git diff --stat
Copied!
git log
Copied!
q to exit out of log mode.git log --oneline
Copied!
git log --pretty=format:"%h - %an, %ar : %s"
Copied!
git checkout example
Copied!