You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have a repository which is forked and locally I have main for the original repo, and I created a main-fork from the forked repo.
I wanted to then push main-fork to the remote fork with the branch name main.
I had done "Set upstream..." to the main branch. But then when I push it just ignores that and creates a fork-main branch on the fork remote.
You can see here that git says the upstream is set correctly:
Make sure you have a local branch called main which tracks origin/main
Now create a new local branch from fork/main called fork-main
Check git -vv to make sure it indicates fork/main is the upstream. If not go to submlime merge and right click fork-main and use Set Upstream... to set it to fork/main and then check again
Now just hit the push button (you don't need to make any commits to fork-main at all, it will still create fork/fork-main`)
Expected behavior
I would expect it to push to fork/main, but instead it creates fork/fork-main and pushes it there
Debug Information
=== App Version Information ===
Build: 2102
=== Git Version Information ===
Using Git: git (system)
git version 2.47.0
PATH: /home/me/.nvm/versions/node/v22.4.1/bin:/home/me/.local/bin:/home/me/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin:/usr/local/go/bin:/home/me/.dotnet:/home/me/.dotnet/tools:/home/me/go/bin:/home/me/.local/share/JetBrains/Toolbox/scripts
=== Browse Page Information ===
HEAD: af874ee4223c322749888bef33433934e2e7c250
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0
=== Git Status Information ===
=== Our Status Information ===
=== Git Config Information ===
branch.fork-main.merge=refs/heads/main
branch.fork-main.remote=fork
branch.main.merge=refs/heads/main
branch.main.remote=origin
core.autocrlf=input
core.bare=false
core.filemode=true
core.logallrefupdates=true
core.repositoryformatversion=0
credential.https://gist.github.com.helper=!/usr/bin/gh auth git-credential
credential.https://githubhere.helper=!/usr/bin/gh auth git-credential
credential.https://githubhere.helper=!/usr/bin/gh auth git-credential
remote.fork.fetch=+refs/heads/*:refs/remotes/fork/*
remote.fork.url=git@githubhere:org/repo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@githubhere:otherorg/repo.git
url.git@githubbhere:.insteadof=https://githubhere
[email protected]
user.name=me
=== Our Config Information ===
Git Config Path Information
Using config path: /etc/gitconfig
Using config path: /home/me/.config/git/config
Using config path: /home/me/.gitconfig
Using config path: /home/me/repos/repo/.git/config
Our config output is identical to the Git config output
=== Git Attributes Information ===
git check_attr --all output
=== Our Modified Files Newline Normalisation and EOL Information ===
=== Our Modified Files Flag Information ===
Ignoring symlinks: 0
=== Staged Files Information ===
=== Repository Statistics ===
Commit Count: 1364
Untracked Files Count: 0
Modified Files Count: 0
Staged Files Count: 0
Submodule Count: 0
Loose Objects Count: 28
Packfile Count: 2
The text was updated successfully, but these errors were encountered:
Version info
Description
So I have a repository which is forked and locally I have
main
for the original repo, and I created amain-fork
from the forked repo.I wanted to then push
main-fork
to the remotefork
with the branch namemain
.I had done "Set upstream..." to the main branch. But then when I push it just ignores that and creates a
fork-main
branch on the fork remote.You can see here that git says the upstream is set correctly:
but it still pushes to
fork/fork-main
Steps to reproduce
Steps to reproduce the behavior:
main
which tracksorigin/main
fork/main
calledfork-main
git -vv
to make sure it indicatesfork/main
is the upstream. If not go to submlime merge and right clickfork-main
and useSet Upstream...
to set it tofork/main
and then check againfork-main
at all, it will still create fork/fork-main`)Expected behavior
I would expect it to push to
fork/main
, but instead it createsfork/fork-main
and pushes it thereDebug Information
The text was updated successfully, but these errors were encountered: