Difference between revisions of "Git push --set-upstream / -u"

From wikieduonline
Jump to navigation Jump to search
Line 36: Line 36:
 
* [[git add .]]
 
* [[git add .]]
 
* <code>[[Git: upstream]]</code>
 
* <code>[[Git: upstream]]</code>
 +
* <code>[[git remote show origin]]</code>
  
 
== See also ==
 
== See also ==

Revision as of 10:56, 19 January 2024

git push --set-upstream / -u
git push --set-upstream origin feature/newbranch
git push --set-upstream origin master
git push --set-upstream origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 223 bytes | 44.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To codecommit::us-east-1://your_repo
* [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
git push --set-upstream origin main
error: src refspec main does not match any
error: failed to push some refs to '[email protected]:xxxxx/yyyyy.git'
if your upstream branch is not already created, you will need to create it by running the “git push” command with the “-u” option for upstream. [1]

Error

git push --set-upstream your-branch
fatal: 'yourbranch' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Related terms

See also

  • https://devconnected.com/how-to-push-git-branch-to-remote/
  • Advertising: