Download - Git Cards - Keynote Format
$git some skills
git initInitialize a new git repo in the current working directory.
git clone <clone_url>
Clone an existing git repo.
git logShow history of changes.
git diffShow changes to tracked files.
git statusShow a list of changed files in the working directory.
git add <path/file>
Add a new file to the current repo.
git add .Stage all new files and changes to tracked files for the current repo.
git add -uStage all removed files and changes to tracked files for the current repo.
git add -AStage all added files, removed files and changes to tracked files for the current repo.
git commit -aCommit all your local changes.
git commit --amendAmend your most recent commit with the current changes.
git tag v1.0Mark a version or milestone.
git pull --rebaseFetch from origin and fast forward your changes on top of it.
git pushPush committed to changes to origin.
git reset --hardDiscard all uncommitted changes in your working tree. Cannot be undone.
git checkout <path/file>
Reset an individual file back to HEAD.
git checkout <branch_name>
Switch branches.
git branchList all local branches for the current repo.
git branch -rList all remote branches for the current repo.
git branch -d <branch>
Delete a local branch.
git push origin :<branch_name>
Delete a remote branch.
git checkout branch2git merge branch1
Merge branch1 into branch2
git checkout -b new_branch old_branch
Create new_branch based on old_branch and switch to it.
git push origin
Push locally created branch to a remote.
git stash
Stash uncommitted changes in current working tree.
git stash pop
Apply stashed changes to current working tree.