草庐IT

foo_original

全部标签

git - 为什么我不能用 git push origin :branchname? 删除远程 git 分支

当我尝试使用gitpushorigin:branchname推送到远程git分支以将其删除时,我收到以下错误消息:error:unabletopushtounqualifieddestination:remotes/origin/branchnameThedestinationrefspecneithermatchesanexistingrefontheremotenorbeginswithrefs/,andweareunabletoguessaprefixbasedonthesourceref.但是当我输入gitbranch-a时,我仍然在remotes/origin/branchn

git - 比较 MAGIT 中两个不同分支的 foo.bar

这个问题在这里已经有了答案:magit:howtodiffthesamefilebetweentwodifferentcommitsonthesamebranch?(4个答案)关闭2年前。这answer展示了如何在git的两个不同分支中查看特定文件foo.bar之间的差异。我的问题是如何在magit内执行此操作?

git pull 给出错误 : 401 Authorization Required while accessing https://git. foo.com/bar.git

我的macbookpro能够从公司的git服务器克隆/推送/pull。我的cent6.3vm出现401错误gitclonehttps://git.acme.com/git/torque-setup"error:TherequestedURLreturnederror:401AuthorizationRequiredwhileaccessinghttps://git.acme.com/git/torque-setup/info/refs作为解决方法,我尝试创建一个文件夹,其中包含一个空存储库,然后将远程设置为公司服务器。我在尝试gitpull时遇到同样的错误机器之间的Remote是相同的

git - git merge master 和 origin/master 之间的区别?

命令gitmergeorigin/master的结果:javanoob@DELL:~/workspace/PROJECT_One$gitmergeorigin/masterUpdatingd83ef9c..dd520eaerror:Thefollowinguntrackedworkingtreefileswouldbeoverwrittenbymerge:sample.txtPleasemoveorremovethembeforeyoucanmerge.Aborting命令gitmergemaster的结果:javanoob@DELL:~/workspace/PROJECT_One$g

git - 为什么 Git 在我运行 "Not currently on any branch"后告诉我 "git checkout origin/<branch>"?

我试图按照Git:"Notcurrentlyonanybranch."Isthereaneasywaytogetbackonabranch,whilekeepingthechanges?中的说明进行操作但是gitcheckout似乎被破坏了:$gitcheckoutorigin/web-zachHEADisnowat1366cb1...Changedsocssfilesnotignored$gitstatus#Notcurrentlyonanybranch.#Untrackedfiles:#(use"gitadd..."toincludeinwhatwillbecommitted)##

git - 如何删除远程 origin/refs/heads/master

别问我怎么做到的,但我在git存储库中意外地获得了以下远程分支:$gitbranch-rorigin/HEAD->origin/masterorigin/masterorigin/refs/heads/master所有都指向同一个提交。如何删除origin/refs/heads/master中不必要的列表?我尝试了以下操作$gitpushorigin:refs/heads/mastererror:dstrefspecrefs/heads/mastermatchesmorethanone.但是如图所示,这给出了一个错误。 最佳答案 这

git - 克隆时 `git` 是否仅命名为 "origin"任何远程?

Git是否只对通过克隆创建的存储库使用远程名称“origin”?例如,假设我创建了一个存储库,将其放在远程服务器上,然后尝试将其再次克隆到同一目录中,Git会将哪个命名为origin? 最佳答案 2010:origin是gitclone使用的默认名称,但您可以在克隆时使用任何其他名称:--origin-oInsteadofusingtheremotenameorigintokeeptrackoftheupstreamrepository,use.如果你不这样做,任何时候你克隆一个repo,那个远程repo将被默认名称引用origin

git push origin 在总消息后挂起

在github上执行gitpushoriginmaster后,推送挂了,没有任何反应。我正在使用https://username@github.com。起初我首先遇到的错误是http.postbuffer太小,我将其更改为http.postbuffer=209715200。现在它卡在Total行之后:Countingobjects:203,done.Deltacompressionusingupto2threads.Compressingobjects:100%(197/197),done.Writingobjects:100%(201/201),49.41MiB|11.07MiB/s

git - 如何删除 remotes/origin/{branch}?

如何删除remotes/origin/{branch}? 最佳答案 使用:gitremotepruneorigin或使用gitremotepruneorigin--dry-run预览哪些分支将被删除。如githelpremote修剪删除下所有陈旧的远程跟踪分支。这些陈旧的分支已经从引用的远程存储库中删除,但仍然在“remotes/”中本地可用。使用--dry-run选项,报告将修剪哪些分支,但实际上并不修剪它们。 关于git-如何删除remotes/origin/{branch}?,我们

git - 您的分支比 'origin/master' 领先 X 次提交。如何找到 X 提交?

这个问题在这里已经有了答案:ViewingunpushedGitcommits(27个答案)关闭8年前。我正在使用以下命令检查X提交:gitlog--author=-但问题是我不小心从另一个存储库中提取了代码,并将该存储库中的提交添加到我的本地git存储库中。所以我不能使用上面的命令,因为新提交包含一些其他作者。