码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-10-20 16:40:29      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:io   os   ar   for   sp   文件   div   on   log   

报错信息:

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 = git@git.platform.chinaso365.com:datawarehouse.git
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
email = wujuan@chinaso.com
name = wujuan
[branch "v1.0.0"]
remote = origin
merge = refs/heads/v1.0.0

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

标签:io   os   ar   for   sp   文件   div   on   log   

原文地址:http://www.cnblogs.com/wujuan/p/4037386.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!