草庐IT

git - 如何将 "develop"分支推送到远程 "origin"?

当我执行gitflowinit时,它会创建一个master和develop分支。当我添加Remote时,我执行gitremoteaddorigingit@github.com:NewB/our-repo.git。现在我已经在本地仓库上初始化了gitflow,并且添加了远程仓库。在我执行gitpush-uoriginmaster之后,我的origin中有master而不是develop分支。develop分支有gitflowpublish吗?我所看到的只是publish用于feature或release分支。git-flow是否希望我只使用常规git并执行gitpushorigindev

git - 如何将 "develop"分支推送到远程 "origin"?

当我执行gitflowinit时,它会创建一个master和develop分支。当我添加Remote时,我执行gitremoteaddorigingit@github.com:NewB/our-repo.git。现在我已经在本地仓库上初始化了gitflow,并且添加了远程仓库。在我执行gitpush-uoriginmaster之后,我的origin中有master而不是develop分支。develop分支有gitflowpublish吗?我所看到的只是publish用于feature或release分支。git-flow是否希望我只使用常规git并执行gitpushorigindev

git - 如何撤消 "git push --mirror"?

在一个git/github项目上,我正在一个分支上工作。一推,它说了以下内容:gitpushTogit@github.com:...![rejected]master->master(non-fast-forward)error:failedtopushsomerefsto'git@github.com:...'Topreventyoufromlosinghistory,non-fast-forwardupdateswererejectedMergetheremotechangesbeforepushingagain.Seethe'Noteaboutfast-forwards'sect

git - 如何撤消 "git push --mirror"?

在一个git/github项目上,我正在一个分支上工作。一推,它说了以下内容:gitpushTogit@github.com:...![rejected]master->master(non-fast-forward)error:failedtopushsomerefsto'git@github.com:...'Topreventyoufromlosinghistory,non-fast-forwardupdateswererejectedMergetheremotechangesbeforepushingagain.Seethe'Noteaboutfast-forwards'sect

git checkout my_branch 与 git checkout origin/my_branch

当我像这样检查branch2时,我在branch1上(两个分支都存在)。gitcheckoutorigin/branch2然后我得到一个分离的头错误:Youarein'detachedHEAD'state.Youcanlookaround,makeexperimentalchangesandcommitthem,andyoucandiscardanycommitsyoumakeinthisstatewithoutimpactinganybranchesbyperforminganothercheckout.但是我只是检查branch2(没有origin)然后它工作正常:gitcheck

git checkout my_branch 与 git checkout origin/my_branch

当我像这样检查branch2时,我在branch1上(两个分支都存在)。gitcheckoutorigin/branch2然后我得到一个分离的头错误:Youarein'detachedHEAD'state.Youcanlookaround,makeexperimentalchangesandcommitthem,andyoucandiscardanycommitsyoumakeinthisstatewithoutimpactinganybranchesbyperforminganothercheckout.但是我只是检查branch2(没有origin)然后它工作正常:gitcheck

Git 存储库丢失了它的远程分支?

我有一个git存储库,有一个远程设置(“gitfetch”有效),但它没有有任何远程分支:“.git/refs/remotes"文件夹不存在,并且gitbranch-r不返回任何内容(空列表,无分支)。然而,实际的远程存储库确实有一个分支。如果我重新克隆远程仓库,我会得到另一个本地仓库,它确实有远程分支。我认为这种状态是不可能的。我的问题:我到底是怎么进入这种状态的?是否有可以运行的命令来恢复“.git/refs/remotes”?(缺少我已经完成的新克隆)。附加信息“gitconfig--getremote.origin.fetch”为空(即命令不产生输出)“gitremotesho

Git 存储库丢失了它的远程分支?

我有一个git存储库,有一个远程设置(“gitfetch”有效),但它没有有任何远程分支:“.git/refs/remotes"文件夹不存在,并且gitbranch-r不返回任何内容(空列表,无分支)。然而,实际的远程存储库确实有一个分支。如果我重新克隆远程仓库,我会得到另一个本地仓库,它确实有远程分支。我认为这种状态是不可能的。我的问题:我到底是怎么进入这种状态的?是否有可以运行的命令来恢复“.git/refs/remotes”?(缺少我已经完成的新克隆)。附加信息“gitconfig--getremote.origin.fetch”为空(即命令不产生输出)“gitremotesho

推送时 Git 无法解析引用

我在使用Git时遇到问题。由于未知原因,我的master分支不知何故被破坏了。我有一个我想推送的本地提交,但是当我推送时,我得到了这个:gitpushoriginmastererror:unabletoresolvereferencerefs/remotes/origin/master:Nosuchfileordirectoryerror:cannotlocktheref'refs/remotes/origin/master'.Everythingup-to-date我在其他板上看到过这个问题,但通常指的是pull而不是推送。尽管如此,我已经尝试了他们的解决方案,但无济于事:尝试修改我

推送时 Git 无法解析引用

我在使用Git时遇到问题。由于未知原因,我的master分支不知何故被破坏了。我有一个我想推送的本地提交,但是当我推送时,我得到了这个:gitpushoriginmastererror:unabletoresolvereferencerefs/remotes/origin/master:Nosuchfileordirectoryerror:cannotlocktheref'refs/remotes/origin/master'.Everythingup-to-date我在其他板上看到过这个问题,但通常指的是pull而不是推送。尽管如此,我已经尝试了他们的解决方案,但无济于事:尝试修改我