tools: git reference

1.create new branch in remote:

git push upstream  xxx:feature/xxx

this means that base on upstream ,you push xxx to feature/xxx

and

git branch -a

to show your remote branch

and git push:

git push upstream devices_health_monitor:feature/devices_health_monitor

 

2.delete branch to remote:

Git: Delete a branch (local or remote) - makandra dev

if you do something wrong  such as create a wrong branch,use 

git push upstream --delelte (your_branch_name ) 

be careful here.

 

3.checkout remote branch

git checkout <feature_branch>

git branch -b new_local_branch_name 

 

or just do it by one line

git checkout upstream/spike/conan -b test_conan
Branch test_conan set up to track remote branch spike/conan from upstream.
Switched to a new branch 'test_conan'

git branch 

shows that you are in test_conan

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值