defaultselected icon
light-blueselected icon
purple-spaceselected icon
matrixselected icon
vs codeselected icon
mid-nightselected icon

git init

Copied Successfully!

TIPS

Export a single snapshot to a ZIP archive called <file>

git archive master --format=zip --output=../website-12-10-2012.zip copy

For Unix users

git archive master --format=tar --output=../website-12-10-2012.tar copy

Export an entire branch, complete with history, to the specified file

git bundle create <file> <branch-name> copy

Re-create a project from a bundled repository and checkout <branch‑name>

git clone repo.bundle <repo-dir> -b <branch-name> copy

Temporarily stash changes to create a clean working directory

git stash copy

Re-apply stashed changes to the working directory

git stash apply copy

View the difference between two commits

git diff <commit-id>..<commit-id> copy

View the difference between the working directory and the staging area

git diff copy

View the difference between the staging area and the most recent commit

git diff --cached copy

Unstage a file, but don’t alter the working directory or move the current branch

git reset HEAD <file> copy

Revert an individual file to match the specified commit without switching branches

git checkout <commit-id> <file> copy

Create a shortcut for a command and store it in the global configuration file

git config --global alias.<alias-name> <git-command><git-command> copy

PLUMBING

Display the specified object, where <type> is one of commit , tree , blob , or tag

git cat-file <type> <object-id> copy

Output the type of the specified object

git cat-file -t <object-id> copy

Display a pretty version of the specified tree object

git ls-tree <tree-id> copy

Perform a garbage collection on the object database

git gc copy

Stage the specified file, using the optional --add flag to denote a new untracked file

git update-index [--add] <file> copy

Generate a tree from the index and store it in the object database. Returns the ID of the new tree object

git write-tree copy

Create a new commit object from the given tree object and parent commit. Returns the ID of the new commit object

git commit-tree <tree-id> -p <parent-id> copy

Tips

Search