1

Git Commands 使用手记

 2 years ago
source link: http://douxinchun.github.io/blog/20180430/git-command-shi-yong-shou-ji.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Git Commands 使用手记

2018 年4 月30 日 5:44 pm | Comments

本文主要用来记录自己在使用Git的过程遇到的一些问题及解决方案.

1.Git push error: dst refspec dev_1.0 matches more than one.

Git 删除远程库中的一个分支的时候报错,如下:

  git push origin --delete dev_1.0
  error: dst refspec dev_1.0 matches more than one.
  error: failed to push some refs to 'git@xxxxx:xxx/xxx.git'

出现这个错误的原因是在于远程Git服务器上名称为dev_1.0的有两个对象:一个是tag,一个是branch;在执行 git push origin –delete dev_1.0这个命令时Git服务器不知道要删除哪个。

删除名称为dev_1.0的branch:

git push origin :refs/heads/dev_1.0

删除名称为dev_1.0的tag:

git push origin :refs/tags/dev_1.0

Posted by Spring

2018 年4 月30 日 5:44 pm

git

« 获取mobileprovision文件的UUID Mac Terminal 快捷键记录 »

Comments


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK