Questions tagged [upstream-branch]
60 questions
1
vote
0 answers
Set upstream branch without using `git push`
After doing
git init
git remote add origin
You can's simply commit and push, since it says
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push…

Diego Alonso
- 71
- 6
1
vote
3 answers
Best way to create new branch copied from old one?
Suppose I want to create a brand-new branch that's an exact copy of an existing one. (If it matters, later I'll explain my particular motivation.)
The first time I needed to do this, I did it "by hand":
git checkout oldbranch
git checkout -b…

Steve Summit
- 45,437
- 7
- 70
- 103
1
vote
1 answer
zsh: number expected while using `git push --set-upstream` command
I am getting zsh: number expected whenever I`m running the following command:-
Command - git push --set-upstream origin branch_name
I`m using Oh My Zsh as my terminal in MacBook Pro with M1 chip.
I even tried another command like git push -u origin…

Lakshay Rohilla
- 1,654
- 6
- 9
- 30
1
vote
1 answer
Fetch upstream from another repo and then push the changes in my local branch
I have two projects one is a mirror from another and I have a branch in the no mirror project that I need to move to the mirror project.
I'm doing the next:
git remote add upstream https://github.com/my/nomirrorProject.git
git fetch upstream…

rasilvap
- 1,771
- 3
- 31
- 70
1
vote
0 answers
Prevent local branch from pushing to upstream branch in DevOps using VSCode?
I have three branches (in DevOps), A, B, and C. In my case, A is the main, B is a development trunkline, and C is a feature being developed for B.
While working on C, I'd like to be pulling changes from B when I fetch and pull. However, when I push,…

Hazel へいぜる
- 2,751
- 1
- 12
- 44
1
vote
2 answers
Difference between `git checkout -b newbranch upstream/newbranch` and `git checkout newbranch`
I have read this answer about importing an upstream branch into a fork. The answer suggests using git checkout -b newbranch upstream/newbranch to switch to the new branch. I always just used git checkout newbranch in this case and it worked aswell.…

stonar96
- 1,359
- 2
- 11
- 39
1
vote
1 answer
How to edit/push/pull the parent of a parent fork on GitHub
For a project I am using a Python package called Efficientnet-pytorch-3d (this github page). This 3D implementation is forked from a 2D implementation called Efficientnet-pytorch (this github page). The fork order on github is like…

schurinkje
- 163
- 1
- 8
1
vote
2 answers
error in pushing the code in my private repository
Can someone help me with below issue:
I cloned data from my professor Git url and trying to set my private account has upstream master and push the code in my private repository (https://github.com/accountid/reponame').
When I git checkout -b…

vss2020
- 11
- 1
1
vote
3 answers
How to push a specific commit to a repo, not including the previous commits, without the history?
I'm trying to push a specific commit to an upstream repo, which is the same as the one I'm working on, but with slight changes.
The current repo is ahead of the upstream one and I want to push some of the changes I made in the current repo, but not…

Aerodynamika
- 7,883
- 16
- 78
- 137
1
vote
1 answer
Git: create fork of project after having worked on a clone of that project
I am currently working on a project in which I have the reporter rights (not allowed to push etc.). Unfortunately I did not create a fork, but cloned the original one on my machine and now I am struggling with the idea how to publish it to get…

bdskfsdk321dsad3
- 113
- 1
- 2
- 9
1
vote
0 answers
Nginx ERROR: Bad Request" while reading response header from upstream, client
I have Ubuntu 18.04, Nginx VPN running 4 wordpress sites (https enabled). These sites uses Cloudflare plugin. When I published new posts or purge cloudflare cache by using WordPress plugin it gives following error.
PHP message: [Cloudflare] ERROR:…

Chathu
- 55
- 8
1
vote
1 answer
Nginx domain resolving issue
I had a proxy server which redirects communications to some api on customer side via https. When I use configuration with set upstream variable (proxy_pass $upstream_endpoint$request_uri;), the DNS resolving for this domain (dynamic changing IP…

PeterH
- 27
- 6
1
vote
1 answer
git set upstream to remote folder in a repository
I currently have a repository with 3 separate directories in it. There's two remote servers and my local machine that currently have a copy of the entire repository in each. Is there a way I can set the upstream and origin for these remote machines…

avenmia
- 2,015
- 4
- 25
- 49
1
vote
2 answers
Do I need to run "add" and "commit" before I "push" changes to upstream (making a PR)?
At the bottom there are contribution rules of a project in GitHub. Particularly step 4 is under the question. It doesn't say anything if I need to run add and commit commands before I run git push --set-upstream.
Because when I have made my changes,…

Green
- 28,742
- 61
- 158
- 247
1
vote
0 answers
git: shortest command to fetch upstream branch of specific tracking branch?
Given a properly configured local, remote-tracking branch example, what is the shortest way to fetch example's remote counterpart specifically?
I could use a bare git fetch origin to fetch all branches, the counterpart included, but this would cause…

LupoCani
- 11
- 3