Git Bug - while working with different remotes and different branch name on local and remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- PFA

--
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

added two remtoe of a project. one is source and other is forked
created a branch with this naming conection <remote-name>-<branch_name>. I use _ instead of - for spaces in branch names.
my branch name is local is different from my branch name is remote.
I did git push using the commad which sets upstream 

git push -u remote_name local_branch:remote_branch

push works. but it forget to use remebered configs for next push.

What did you expect to happen? (Expected behavior)

it shoud remember my configs and when i perform git push it should automatically push to configured remote.

What happened instead? (Actual behavior)

it throws error. I have attached error along with essential debug information

(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git push
fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push akhil-answer HEAD:tag_relations_refactor

To push to the branch of the same name on the remote, use

    git push akhil-answer HEAD

To choose either option permanently, see push.default in 'git help config'.

To avoid automatically configuring an upstream branch when its name
won't match the local branch, see option 'simple' of branch.autoSetupMerge
in 'git help config'.

(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git rev-parse --abbrev-ref --symbolic-full-name @{upstream}
akhil-answer/tag_relations_refactor
(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git status
On branch akhil-tag_relations_refactor
Your branch is up to date with 'akhil-answer/tag_relations_refactor'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .git-bugreport-2024-03-20-1819.txt.swp
        git-bugreport-2024-03-20-1819.txt

nothing added to commit but untracked files present (use "git add" to track)
(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % 

What's different between what you expected and what actually happened?

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.39.3 (Apple Git-146)
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:59 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6030 arm64
compiler info: clang: 15.0.0 (clang-1500.3.9.4)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux