git 命令

git clone {url} 检出

 

git init 本地初始化git仓库

git --globle user.name 设置全局用户名

git --globle user.email 设置全局邮箱

git remote add {origin} {url} 关联远程库

git remote remove {origin} 取消关联远程库

git remote remove {branch} 删除远程库分支

 

git add {file} 选中更改

git commit -m {msg} 提交

git pull {origin} {branch} 更新远程库分支到本地

--allow-unrelated-histories 强制从版本历史不同的库更新

git push {origin} {branch} 提交修改到远程库

git checkout (gco) 切换分支

-b {branchName} 新建分支

git branch  查看本地分支

-D {branchName} 删除本地分支

git branch -m {oldName} {newName} 重命名分支

git branch --set-upstream-to {origin/branchName} 将当前分支关联到远程分支

git merge {branchName} 合并分支

转载于:https://my.oschina.net/taoluoluo/blog/904551

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值