我正在尝试删除远程git分支
git push origin :my_remote_branch
Run Code Online (Sandbox Code Playgroud)
得到:
error: unable to push to unqualified destination: my_remote_branch
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@example.com:/myrepo'
Run Code Online (Sandbox Code Playgroud)
这些是我目前的分支机构
git branch -a
* develop
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/my_remote_branch
git branch -r --merged
origin/HEAD -> origin/master
origin/develop
origin/master
Run Code Online (Sandbox Code Playgroud)
关于如何摆脱这个分支的任何想法将不胜感激.
说我做了几次提交,并希望能够选择我推送到远程存储库的那些提交.我怎么能这样做(在ascii:C1-> C2-> C3-> C4,我想推C2和C4).是否会重新订购rebase,重置,推送然后重置工作?(C1-> C2-> C3-> C4 => C2-> C4-> C1-> C3 =>复位C4 => push =>复位C3).有更好的方法吗?
我是Git的新手,有一个相当大的项目,我想推送到Github上的远程仓库(Repo B).最初的项目也在Github上,但来自不同的回购(Repo A).在我可以在Repo B上设置项目之前,我必须对Repo A中的文件进行一些更改.我已经设置了遥控器,ssh键等,并且在将代码库推送到Repo B时遇到了问题.
我总是得到以下错误:
$ git push <remote_repo_name> master
Enter passphrase for key '/c/ssh/.ssh/id_rsa':
Counting objects: 146106, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35519/35519), done.
fatal: pack exceeds maximum allowed size00 GiB | 154 KiB/s
fatal: sha1 file '<stdout>' write error: Invalid arguments
error: failed to push some refs to 'git@github.com:<repo>.git
Run Code Online (Sandbox Code Playgroud)
我在本地gitconfig中更改了以下设置
git config pack.packSizeLimit 1g
git config pack.windowMemory 1g
Run Code Online (Sandbox Code Playgroud)
...并运行git gc(我看到重新组织了包,以便每个包保持在1GB的包装内).这不起作用,我得到上面看到的错误.
我试图降低每包的尺寸....
git config pack.packSizeLimit 500m
git config pack.windowMemory 500m
Run Code Online (Sandbox Code Playgroud)
...并运行git …
我刚刚创建了一个新的Heroku应用程序,我无法将backend我的repo(分支staging)的子树文件夹推送到新创建的应用程序myapp-staging(还没有分支).
以下是我推送子树的方法:
git push heroku `git subtree split --prefix=backend staging`:master
Run Code Online (Sandbox Code Playgroud)
一个相关的错误:
error: unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@heroku.com:myapp-staging.git'
Run Code Online (Sandbox Code Playgroud)
我试过了git fetch heroku.这个"不合格的目的地"是什么意思?这个命令不应该创建远程分支吗?
我正在尝试为我的应用程序创建一个演示分支,供应商可以在其中登录以了解有关其功能的更多信息。
我有一个主分支,可以在 Heroku 上部署到生产环境。此外,我有一个部署到我的 Heroku 暂存环境的暂存分支。在 Github 应用程序中,我从暂存分支创建了一个名为“演示”的分支。
当我使用 CircleCI 进行部署时,我收到以下错误:
unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master returned exit code 1
error: failed to push some refs to 'git@heroku.com:foobar-demo.git' Action failed: git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master
Run Code Online (Sandbox Code Playgroud)
我的 circle.yml 如下所示:
deployment:
staging:
branch: staging
commands:
- heroku maintenance:on --app …Run Code Online (Sandbox Code Playgroud)