Editing Git push --set-upstream / -u
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 3: | Line 3: | ||
[[git push --set-upstream]] / -u | [[git push --set-upstream]] / -u | ||
− | [[git push --set-upstream origin | + | [[git push --set-upstream origin]] feature/newbranch |
− | |||
[[git push --set-upstream origin master]] | [[git push --set-upstream origin master]] | ||
Line 15: | Line 14: | ||
* [new branch] master -> master | * [new branch] master -> master | ||
Branch 'master' set up to track remote branch 'master' from 'origin'. | Branch 'master' set up to track remote branch 'master' from 'origin'. | ||
− | |||
− | |||
− | |||
− | |||
[[git push --set-upstream]] origin [[main]] | [[git push --set-upstream]] origin [[main]] | ||
Line 26: | Line 21: | ||
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. <ref>https://devconnected.com/how-to-push-git-branch-to-remote/</ref> | 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. <ref>https://devconnected.com/how-to-push-git-branch-to-remote/</ref> | ||
− | == | + | == Error == |
git push --set-upstream your-branch | git push --set-upstream your-branch | ||
fatal: 'yourbranch' does not appear to be a git repository | fatal: 'yourbranch' does not appear to be a git repository | ||
Line 32: | Line 27: | ||
Please make sure you have the correct access rights | Please make sure you have the correct access rights | ||
and the repository exists. | and the repository exists. | ||
− | |||
− | |||
− | |||
− | |||
== Related terms == | == Related terms == | ||
Line 43: | Line 34: | ||
* [[Git: upstream]] | * [[Git: upstream]] | ||
* <code>[[git push --dry-run]]</code> | * <code>[[git push --dry-run]]</code> | ||
− | * | + | * [[git add .]] |
* <code>[[Git: upstream]]</code> | * <code>[[Git: upstream]]</code> | ||
* <code>[[git remote show origin]]</code> | * <code>[[git remote show origin]]</code> |
Advertising: