git clone -b 分支名 url
git pull
git push
git push --force 一般会退修改再次提交会冲突,可以强制push,
git status
git diff
git add 增加文件到暂存区
git commit -s -m -s:附带签名,会附带git配置的用户名和邮箱 -m 注释
git reset —hard HEAD^
git reset --soft HEAD^ 与上面的区别:soft会保留增加到暂存区的内容,可以接着上次的编辑,而--hard并不会保留
git reset —hard 【commit id前七位】
git log --oneline 简略显示注释
git cherry-pick commit id 摘取某一次分支的提交,一般要解决冲突
git reflog 简洁的显示提交记录id
git remote -v 查看远程分支
git branch 查看当前所处分之
git branch -b xxx 切换并创建分支
git checkout xx 切换分支
工作区 add
暂存区 commit
本地仓库 push
远程仓库