git命令

git

// 创建空分支
git checkout --orphan develop

echo " hello " > text.txt

git commit -m “first commit new edition”

// git push [remote-name] [branch-name]
git push master develop
// 查看本地分支
git tag
// 创建标签
git tag -a v1.0.0 -m “集成 sso jenkins rancher”
// 查看
git show v1.0.0
// 推送到远程
git push master --tags
// 获取tag版本
git fetch master tag V1.2
// 删除远程tag
git push origin --delete tag
// 从远程的qloudoep仓库的develop分支下载到本地并新建一个分支develop
git fetch qloudoep develop:develop
// 从远程仓库qloudoep下载develop分支到本地
git pull qloudoep develop
// 切换分支
git fetch develop
// 删除分支
git push origin --delete qloudoep-webui_2019-09-09
// 获取仓库某分支
git clone -b b1 https://github.com/…
//
git push --set-upstream qloudoep master
// 创建分支
git checkout -b branchname

// 新建库之后pull
git pull origin master --allow-unrelated-histories

// 恢复之前的版本
git log
git reset --hard b68b2b291caf355a1076937a34cd74533751dba3
git push -f develop master

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值