美文网首页技术文
Git 常用命令

Git 常用命令

作者: BoTang | 来源:发表于2016-12-08 10:41 被阅读0次

git config --global user.name "Your Name"  配置用户名

git config --global user.email your.email@example.com 配置用户邮箱

git init                      初始化项目

git status                 查看当前状态

git add -A                添加

git commit -m ‘    ’  提交

git log                   查看提交记录

git checkout -f    强制撤销上次改动

git remote add origin git@github.org:/hello_app.git   选择仓库源

git push -u origin --all            push到仓库

git checkout -b modify-README    创建分支并切换到该分支

git branch       查看所有分支 

git checkout master    切换回主支

git merge modify-README   将分支与主支合并

git push 推送到仓库

git checkout -d modify-README 删除分支

相关文章

网友评论

    本文标题:Git 常用命令

    本文链接:https://www.haomeiwen.com/subject/ngajmttx.html