Difference between revisions of "How to commit to remote branch"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
Line 12: | Line 12: | ||
hint: See the 'Note about [[fast-forwards]]' in '[[git push --help]]' for details. | hint: See the 'Note about [[fast-forwards]]' in '[[git push --help]]' for details. | ||
+ | |||
+ | git push origin HEAD:remotes/origin/your-branch | ||
+ | error: The destination you provided is not a full [[refname]] (i.e., | ||
+ | starting with "refs/"). We tried to guess what you meant by: | ||
+ | |||
+ | - Looking for a ref that matches 'remotes/origin/your-branch' on the remote side. | ||
+ | - Checking if the <src> being pushed ('HEAD') | ||
+ | is a ref in "refs/{heads,tags}/". If so we add a corresponding | ||
+ | refs/{heads,tags}/ prefix on the remote side. | ||
+ | |||
+ | Neither worked, so we gave up. You must fully qualify the ref. | ||
+ | hint: The <src> part of the [[refspec]] is a commit object. | ||
+ | hint: Did you mean to create a new branch by pushing to | ||
+ | hint: 'HEAD:refs/heads/remotes/origin/your-branch'? | ||
+ | error: failed to push some refs to 'bitbucket.org:your-project/your-repo.git' | ||
== Related == | == Related == |
Revision as of 12:37, 17 March 2023
git push origin HEAD:your-name-of-remote-branch Enumerating objects: 21, done. Counting objects: 100% (21/21), done. Delta compression using up to 8 threads Compressing objects: 100% (11/11), done. Writing objects: 100% (11/11), 5.48 KiB | 801.00 KiB/s, done. Total 11 (delta 9), reused 0 (delta 0), pack-reused 0 remote: remote: View merge request for your-name-of-remote-branch: remote: https://gitlab.com/your-project/your-app/-/merge_requests/2913 remote: To gitlab.com:your-project/your-app.git 7caef6a60..f942d7435 HEAD -> your-name-of-remote-branch
Errors
! [rejected] HEAD -> your-branch (non-fast-forward) error: failed to push some refs to 'gitlab.com:your-project/your-app.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git push origin HEAD:remotes/origin/your-branch error: The destination you provided is not a full refname (i.e., starting with "refs/"). We tried to guess what you meant by: - Looking for a ref that matches 'remotes/origin/your-branch' on the remote side. - Checking if the <src> being pushed ('HEAD') is a ref in "refs/{heads,tags}/". If so we add a corresponding refs/{heads,tags}/ prefix on the remote side. Neither worked, so we gave up. You must fully qualify the ref. hint: The <src> part of the refspec is a commit object. hint: Did you mean to create a new branch by pushing to hint: 'HEAD:refs/heads/remotes/origin/your-branch'? error: failed to push some refs to 'bitbucket.org:your-project/your-repo.git'
Related
See also
Advertising: