git init
Initialize a new Git repository.
git clone <repo>
Clone a repository into a new directory.
git remote -v
Show the URLs of the remote repositories.
git add <file>
Add file contents to the index.
git commit -m "message"
Record changes to the repository with a message.
git status
Show the working tree status.
git branch
List, create, or delete branches.
git checkout <branch>
Switch to another branch.
git merge <branch>
Merge another branch into the current branch.
git rebase <branch>
Reapply commits on top of another base branch.
git log
Show commit logs.
git diff
Show changes between commits, etc.
git blame <file>
Show who modified each line of a file.
git bisect
Use binary search to find the commit introducing a bug.
git push
Update the remote repository.
git pull
Fetch and merge changes from remote.
git fetch
Download objects and refs from another repository.
git stash
Save changes to a stash for later use.
git stash pop
Apply and remove the latest stash.
git reset <file>
Unstage a file while keeping the changes in the working directory.
git cherry-pick <commit>
Apply changes introduced by a specific commit.
git clean -f
Remove untracked files from the working directory.
git rm <file>
Remove a file from the working tree and index.
git mv <old> <new>
Move or rename a file, directory, or symlink.
git tag
List, create, or delete tags.
git show <commit>
Show various types of objects like commits, trees, etc.
git config
Get and set repository options.
git archive
Create an archive of files from a named tree.
No favorites added yet.
This Git Cheat Sheet is a powerful reference tool designed to help you quickly recall essential Git commands. It is crucial for managing your repositories, tracking changes, and collaborating with others effectively. With just a glance, you can access the commands that enhance your version control workflow.
Git commands are the building blocks of version control. They allow you to create, modify, and manage your code repositories efficiently. This cheat sheet is particularly useful for both beginners and experienced developers, providing a quick reference to essential commands that streamline your development process.
Comprehensive Command List: Access a wide range of Git commands for various tasks, from basic operations to advanced features.
Quick Reference: Easily find the commands you need without sifting through documentation, saving you time and effort.
Version Control Best Practices: Learn about best practices for using Git effectively, including branching strategies and commit message guidelines.
Collaboration Tools: Understand how to use Git for collaboration, including merging, rebasing, and resolving conflicts.