Editing Git push origin

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lc}}
 
[[git push]] origin
 
  
git push origin [[HEAD]]:/your-branch
 
  
[[git push]] origin HEAD:name-of-remote-branch-without-origin/
 
  
[[git push origin HEAD]]
+
* [[How to commit to remote branch]]
  
git push origin HEAD: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 'origin/revert-timescale-var-names' 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/origin/your-branch'?
 
error: failed to push some refs to 'github.com:your-project/your-repo.git'
 
 
Solution: remove second origin in the command, correct: [[git push]] origin [[HEAD]]:/your-branch
 
 
 
== Related ==
 
* [[How to commit to remote branch]]: <code>[[git push origin]] HEAD:your-name-of-remote-branch</code>
 
* <code>[[git add]]</code>
 
* <code>[[git push -u origin master]]</code>
 
* <code>[[git push --set-upstream]]</code>
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page:

Advertising: