草庐IT

cross-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存储库中。所以我不能使用上面的命令,因为新提交包含一些其他作者。

Git - 致命的 : remote origin already exists

我无法使用remote命令远程创建源:$gitremoteaddoriginhttps://github.com/LongKnight/git-basics.gitfatal:remoteoriginalreadyexists.为了解决这个错误,我试过这个:$gitremote-vorigin$gitremote-vshoworigin它没有将文件从我的本地存储库上传到远程:$gitpush-uoriginmasterfatal:'origin'doesnotappeartobeagitrepositoryfatal:Couldnotreadfromremoterepository.P

git fetch 与 git fetch origin master 对跟踪分支有不同的影响

这主要是出于好奇,因为我正在尝试熟悉Git。我查看了“gitfetch”的文档,但没有看到对以下内容的明显解释。提前致谢,如果这非常明显,我们深表歉意。1)从一个中央存储库,比如GitHub,我在两台机器HostA和HostB上分别克隆了一个名为website的存储库。2)在HostA上,我更改了一个文件,例如README.txt,然后提交。此时在HostA上,分支master和origin/master正如预期的那样不同,因为我还没有推送gitshowmastergitshoworigin/master报告不同的哈希值(因为master有变化而origin/master没有)3)一旦

git - "refs/heads/master"与 Git 中的 "refs/remotes/origin/master"相同吗?

问题很简单:refs/heads/master和refs/remotes/origin/master是一回事吗?如果在某些情况下不是,我怎么知道什么时候不是,然后又是什么? 最佳答案 它们是两个不同的符号名称,可以指向不同的事物。refs/heads/master是您工作副本中名为master的一个分支。通常这是refs/remotes/origin/master的跟踪分支,因为origin是由gitclone及其创建的远程的默认名称主分支通常也被命名为master。你可以通过gitrev-listrefs/heads/master

git - "origin master"和 "origin/master"有什么区别

运行git命令时空格和斜杠有什么区别?我有时会看到gitpushoriginmaster(这是一个空格)还有其他时候我看到gitrebaseorigin/master(使用斜杠)这个约定有什么区别?斜杠符号是否访问本地缓存副本,而空间版本实际上到达远程存储库(github)? 最佳答案 这不是一个“约定”。前者是在不同位置的两个单独的参数,对gitpush具有不同的含义,后者是一个单独的参数,用于标识远程跟踪分支origin/master。 关于git-"originmaster"和"o

混帐 : fatal: Ambiguous object name: 'origin/release_2.6'

尝试创建远程跟踪分支时出现此错误gitco-brelease_2.6origin/release_2.6warning:refname'origin/release_2.6'isambiguous.warning:refname'origin/release_2.6'isambiguous.fatal:Ambiguousobjectname:'origin/release_2.6'.我只有这两个refs定义了release_2.6gitshow-ref|grep"release_2.6"a71b2da1526f73862464a23aceaa1939a8b1ace2refs/heads

git - 致命的 : ambiguous argument 'origin' : unknown revision or path not in the working tree

我过去经常使用gitdifforigin。在不同的环境中它不起作用。我不知道为什么。user@host>gitdifforiginfatal:ambiguousargument'origin':unknownrevisionorpathnotintheworkingtree.Use'--'toseparatepathsfromrevisions,likethis:'git[...]--[...]'状态:user@host>gitstatusOnbranchmasternothingtocommit,workingdirectorycleanRemote:user@host>gitrem

git - 为什么 Git 不默认为 "origin master"?

我尝试了很多次做一个gitpull它说没有指定分支。所以答案在Howdoyougetgittoalwayspullfromaspecificbranch?似乎有效。但是我想知道,为什么Git不默认到master分支呢?如果未指定任何内容,是否表示master分支没有意义? 最佳答案 git尝试根据您当前所在的分支为gitpull使用合理的默认值。如果你在master上时从gitpull得到你提到的错误,这意味着你没有为master配置上游分支>。在许多情况下,这将已经配置-例如,当您从存储库克隆时,gitclone将设置origin