Git 命令之基础命令
Git About 475 words查看状态
git status
查看分支
git branch
创建分支
分支名称可任意
git branch 分支名称
git branch dev_branch
切换到指定分支
git checkout dev_branch
创建并切换到指定分支
git checkout -b dev_branch
合并分支到 master
1.先切换到master
git checkout master
2.合并分支到master上
git merge dev_branch
删除分支
git branch -d dev_branch
对比差异 diff
git diff readme.txt
提交到本地仓库
git add -u
git commit -m "添加注释"
推送到远程 master
git push origin master
# 默认分支为orgin master,所以可直接使用git push
git push
推送到远程 dev_branch 分支
git push origin dev_branch
Views: 2,011 · Posted: 2019-03-18
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...