git init
git clone <repository_url>
git status
git add <file>
git add .
git commit -m "commit message"
git commit -am "commit message"
git branch
git branch <branch_name>
git checkout <branch_name>
git checkout -b <branch_name>
git checkout <target_branch>
git merge <branch_to_merge>
git remote add <remote_name> <repository_url>
git remote -v
git fetch <remote_name>
git pull <remote_name> <branch_name>
git push <remote_name> <branch_name>
git checkout -- <file>
git reset HEAD <file>
git reset --soft HEAD~1
git reset --hard HEAD~1
git revert <commit_id>
git log
git log -p
git show <commit_id>
git log -p <file>
git stash
git stash list
git stash apply
git stash pop
git stash drop
git tag <tag_name>
git tag
git push <remote_name> <tag_name>
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Keep this cheatsheet handy for quick reference while working with Git!
Discover essential insights for aspiring software engineers in 2023. This guide covers career paths, skills,…
Explore the latest trends in software engineering and discover how to navigate the future of…
Discover the essentials of software engineering in this comprehensive guide. Explore key programming languages, best…
Explore the distinctions between URI, URL, and URN in this insightful article. Understand their unique…
Discover how social networks compromise privacy by harvesting personal data and employing unethical practices. Uncover…
Learn how to determine if a checkbox is checked using jQuery with simple code examples…
View Comments
Great guide on viewing history and stashing changes. Very informative!
Good summary of commands for remote repositories. Easy to follow!
I like the section on branching. It explains how to create and switch branches.
The undoing changes part is very useful. Helps to correct mistakes quickly.
This cheatsheet is very helpful. It shows how to use basic commands in Git.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.