All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Akhil Surapuram <surapuramakhil@gmail.com>
To: git@vger.kernel.org
Subject: Git Bug - while working with different remotes and different branch name on local and remote
Date: Wed, 20 Mar 2024 18:30:43 -0400	[thread overview]
Message-ID: <CA+m=7Rz3rpnJpt_w6dQWd3=7AaHxYgzU2+ynCo0KQ6r_0oitJA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 130 bytes --]

- PFA

-- 
Regards,
*Akhil Surapuram*
*https://www.linkedin.com/in/surapuramakhil/
<https://www.linkedin.com/in/surapuramakhil/>*

[-- Attachment #1.2: Type: text/html, Size: 541 bytes --]

[-- Attachment #2: git-bugreport-2024-03-20-1819.txt --]
[-- Type: text/plain, Size: 2834 bytes --]

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]

                 reply	other threads:[~2024-03-20 22:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+m=7Rz3rpnJpt_w6dQWd3=7AaHxYgzU2+ynCo0KQ6r_0oitJA@mail.gmail.com' \
    --to=surapuramakhil@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.