git 添加新分支后可能报错及解决方案

报错信息:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.v1.0.0.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull ').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:

[branch "v1.0.0"]
remote = <nickname>
merge = <remote-ref>
 
[remote "<nickname>"]
url = <url>
fetch = <refspec>

See git-config(1) for details.

解决方案

修改.git/config文件

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = yourgitrepo
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
email = yourname@yourcompany.com
name = yourname
[branch "v1.0.0"]
remote = origin
merge = refs/heads/v1.0.0

转载于:https://www.cnblogs.com/wujuan/p/4037386.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值