Git

Version control commands for managing repositories, branches, and commits

42 commands
Search & Copy
Save Favorites
42
Total Commands
100%
Free Access
Lightning Fast

Available Commands

Click on any command to copy it instantly

42 commands available
42 of 42
Resources

Learn Git Deeper

Master version control with comprehensive resources

git

Initialize Repository

Create an empty Git repository in a directory to start version controlling your project

git init
git
init
repository
+3 more
git

Clone Repository

Clone an existing Git repository from a remote server to your local machine, creating a complete copy with full history

git clone <repository>
git
clone
repository
+3 more
git

Configure Git

Configure Git settings including user identity, editor preferences, and repository-specific options

git config
git
config
user
+2 more
git

Check Repository Status

Display the current state of your working directory and staging area, showing which files are modified, staged, or untracked

git status
git
status
repository
+3 more
git

View Commit History

Show commit logs

git log
git
log
history
git

Show Commit Details

Show various types of objects

git show
git
show
commit
git

Show Changes

Show changes between commits

git diff
git
diff
changes
git

List/Create Branches

List, create, or delete branches

git branch
git
branch
list
git

Switch Branches

Switch branches or restore files

git checkout
git
checkout
branch
git

Switch Branches (New)

Switch branches (Git 2.23+)

git switch
git
switch
branch
git

Merge Branches

Join two or more development histories together

git merge
git
merge
branch
git

Rebase Branch

Reapply commits on top of another base tip

git rebase
git
rebase
branch
git

Add Files

Stage file changes to the Git index (staging area) in preparation for committing

git add
git
add
files
+3 more
git

Commit Changes

Create a commit to permanently record staged changes in the repository history with a descriptive message

git commit
git
commit
changes
+3 more
git

Reset Changes

Reset current HEAD to the specified state

git reset
git
reset
changes
git

Restore Files

Restore working tree files (Git 2.23+)

git restore
git
restore
files
git

Revert Commit

Create new commit that undoes changes

git revert
git
revert
commit
git

Manage Remotes

Manage set of tracked repositories

git remote
git
remote
repository
git

Fetch from Remote

Download objects and refs from another repository

git fetch
git
fetch
remote
git

Pull from Remote

Download and integrate changes from a remote repository into your current local branch, combining fetch and merge in one command

git pull
git
pull
remote
+3 more
git

Push to Remote

Upload your local commits to a remote repository, making your changes available to collaborators and updating the remote branch

git push
git
push
remote
+3 more
git

Stash Changes

Temporarily save your uncommitted changes without committing them, allowing you to work on something else and restore them later

git stash
git
stash
changes
+2 more
git

Apply Stash

Reapply previously stashed changes without removing them from the stash list

git stash apply
git
stash
apply
+2 more
git

Manage Tags

Create, list, and manage tags for marking specific commits in your repository

git tag
git
tag
repository
+2 more
git

Push Tags to Remote

Push local tags to a remote repository so others can access them

git push --tags
git
push
tags
+2 more
git

Delete Tag

Delete local or remote tags

git tag -d <tag>
git
tag
delete
+1 more
git

List Tags

List all tags in the repository with optional filtering

git tag
git
tag
list
+2 more
git

Manage Submodules

Initialize, update, or inspect submodules in a Git repository to manage nested dependencies

git submodule
git
submodule
repository
+3 more
git

Clean Untracked Files

Remove untracked files and directories from your working tree to restore a clean workspace

git clean
git
clean
files
+3 more
git

Binary Search for Bugs

Use binary search to find the specific commit that introduced a bug or regression

git bisect
git
bisect
debug
+4 more
git

Manage Worktrees

Manage multiple working trees linked to a single Git repository for simultaneous development across branches

git worktree
git
worktree
repository
+3 more
git

Reference Log

Record when the tips of branches were updated

git reflog
git
reflog
history
git

Rewrite History

Rewrite branches to filter out some files or modify commits

git filter-branch
git
filter
history
git

Garbage Collection

Cleanup unnecessary files and optimize local repository

git gc
git
gc
cleanup
git

Create Patch

Prepare patches for email submission

git format-patch
git
patch
email
git

Apply Patch

Apply a series of patches from a mailbox

git am
git
patch
mailbox
git

File Annotation

Show what revision and author last modified each line of a file

git blame
git
blame
file
git

Search Code

Print lines matching a pattern

git grep
git
grep
search
git

File System Check

Verify connectivity and validity of objects in database

git fsck
git
fsck
integrity
git

Prune Objects

Prune all unreachable objects from object database

git prune
git
prune
objects
git

Show Object

Provide content or type and size information for repository objects

git cat-file
git
cat
file
git

Compute Object ID

Compute object ID and optionally create a blob from a file

git hash-object
git
hash
object

Missing a command?

Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!