{"thread":{"id":"61167","subject":"Git Bug - while working with different remotes and different branch name on local and remote","startedAt":"2024-03-20T22:30:56Z","lastAt":"2024-03-20T22:30:56Z","messageCount":1,"participants":["Akhil Surapuram"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"491071","messageId":"CA+m=7Rz3rpnJpt_w6dQWd3=7AaHxYgzU2+ynCo0KQ6r_0oitJA@mail.gmail.com","threadId":"61167","inReplyTo":null,"subject":"Git Bug - while working with different remotes and different branch name on local and remote","fromName":"Akhil Surapuram","fromEmail":"surapuramakhil@gmail.com","sentAt":"2024-03-20T22:30:43Z","receivedAt":"2024-03-20T22:30:56Z","isPatch":false,"sender":{"key":"surapuramakhil@gmail.com","avatar":null},"body":"- PFA\n\n-- \nRegards,\n*Akhil Surapuram*\n*https://www.linkedin.com/in/surapuramakhil/\n<https://www.linkedin.com/in/surapuramakhil/>*\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nadded two remtoe of a project. one is source and other is forked\ncreated a branch with this naming conection <remote-name>-<branch_name>. I use _ instead of - for spaces in branch names.\nmy branch name is local is different from my branch name is remote.\nI did git push using the commad which sets upstream \n\ngit push -u remote_name local_branch:remote_branch\n\npush works. but it forget to use remebered configs for next push.\n\nWhat did you expect to happen? (Expected behavior)\n\nit shoud remember my configs and when i perform git push it should automatically push to configured remote.\n\nWhat happened instead? (Actual behavior)\n\nit throws error. I have attached error along with essential debug information\n\n(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git push\nfatal: The upstream branch of your current branch does not match\nthe name of your current branch.  To push to the upstream branch\non the remote, use\n\n    git push akhil-answer HEAD:tag_relations_refactor\n\nTo push to the branch of the same name on the remote, use\n\n    git push akhil-answer HEAD\n\nTo choose either option permanently, see push.default in 'git help config'.\n\nTo avoid automatically configuring an upstream branch when its name\nwon't match the local branch, see option 'simple' of branch.autoSetupMerge\nin 'git help config'.\n\n(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git rev-parse --abbrev-ref --symbolic-full-name @{upstream}\nakhil-answer/tag_relations_refactor\n(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % git status\nOn branch akhil-tag_relations_refactor\nYour branch is up to date with 'akhil-answer/tag_relations_refactor'.\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        .git-bugreport-2024-03-20-1819.txt.swp\n        git-bugreport-2024-03-20-1819.txt\n\nnothing added to commit but untracked files present (use \"git add\" to track)\n(base) akhilsurapuram@Akhils-MacBook-Pro incubator-answer % \n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.39.3 (Apple Git-146)\ncpu: arm64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: 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\ncompiler info: clang: 15.0.0 (clang-1500.3.9.4)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\n"}]}