Quick Reference Guide, Coding Faster And Easier.
KeyExplanationExample
git init初始化本地仓库git init
git clone克隆远程仓库到本地git clone <repository-url>
git add将文件添加到暂存区git add <file>
git commit提交暂存区的文件到本地仓库git commit -m 'Commit message'
git push将本地仓库的变更推送到远程仓库git push origin <branch-name>
git pull从远程仓库拉取变更到本地仓库git pull origin <branch-name>
git checkout切换分支或恢复文件git checkout <branch-name>
git merge合并指定分支到当前分支git merge <branch-name>
git branch列出本地分支或创建新分支git branch <branch-name>
git status查看工作区和暂存区的状态git status
git log查看提交日志git log
git remote管理远程仓库git remote -v
git config配置 Gitgit config --global user.name 'Your Name'