{"thread":{"id":"61812","subject":"Bug report","startedAt":"2024-07-19T18:34:41Z","lastAt":"2024-07-19T20:41:08Z","messageCount":4,"participants":["Roman Dvoskin","brian m. carlson","rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"498975","messageId":"CAKexjB-+6VXE8YXrc1YaOVE6bKs05Ty4XHMSBPRHUcUrxpp31w@mail.gmail.com","threadId":"61812","inReplyTo":null,"subject":"Bug report","fromName":"Roman Dvoskin","fromEmail":"rdvoskin@mytechnologyco.com","sentAt":"2024-07-19T18:34:29Z","receivedAt":"2024-07-19T18:34:41Z","isPatch":false,"sender":{"key":"rdvoskin@mytechnologyco.com","avatar":null},"body":"\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)\nI renamed an existing branch to a new name\nWhat did you expect to happen? (Expected behavior)\nWhen I git push I expected the new name to be used to match the remote branch\nWhat happened instead? (Actual behavior)\nI was prompted to use git push HEAD:<old_branch_name>\nWhat's different between what you expected and what actually happened?\nI expected for the new branch name to be used, as if it was always the branch name\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: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64\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]\npre-commit\n"},{"id":"498976","messageId":"ZprI_wP1km8eA7HA@tapette.crustytoothpaste.net","threadId":"61812","inReplyTo":"CAKexjB-+6VXE8YXrc1YaOVE6bKs05Ty4XHMSBPRHUcUrxpp31w@mail.gmail.com","subject":"Re: Bug report","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-07-19T20:13:51Z","receivedAt":"2024-07-19T20:13:59Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Hey,\n\nOn 2024-07-19 at 18:34:29, Roman Dvoskin wrote:\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n> \n> What did you do before the bug happened? (Steps to reproduce your issue)\n> I renamed an existing branch to a new name\n> What did you expect to happen? (Expected behavior)\n> When I git push I expected the new name to be used to match the remote branch\n> What happened instead? (Actual behavior)\n> I was prompted to use git push HEAD:<old_branch_name>\n> What's different between what you expected and what actually happened?\n> I expected for the new branch name to be used, as if it was always the branch name\n> Anything else you want to add:\n\nI'm not sure I understand exactly the message that you saw here, and I\nsuspect if I don't understand, it's possible other people on the list\ndon't either. Could you copy and paste the exact output you saw here so\nthat we can see what the prompt looks like and the exact response you\nsaw? That would help us understand whether the behaviour you saw is a\nbug or not, or if perhaps maybe the documentation is unclear.\n\nAlso, to be sure I understand, you did something like this:\n\n----\ngit branch -m foo bar\ngit push origin bar\n----\n\nand you expected the local branch `bar` to be pushed to the remote branch\n`bar`, correct?\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"498977","messageId":"CAKexjB_kya5ux+OZPXVumwxVt9HWD2v3TMF7aFbMxXzYYV_t=A@mail.gmail.com","threadId":"61812","inReplyTo":"ZprI_wP1km8eA7HA@tapette.crustytoothpaste.net","subject":"Re: Bug report","fromName":"Roman Dvoskin","fromEmail":"rdvoskin@mytechnologyco.com","sentAt":"2024-07-19T20:35:46Z","receivedAt":"2024-07-19T20:35:57Z","isPatch":false,"sender":{"key":"rdvoskin@mytechnologyco.com","avatar":null},"body":"Hi Brian,\n\nYes, you're exactly right, I renamed the branch called PLT-51 to\nPLT-50-2 via `git branch -m PLT-50-2`. I may have pushed while on\nPLT-51 (and perhaps that's when I noticed that I mis-named the branch)\nbut I did not create a PR). Then, I renamed the branch to PLT-50-2 and\nexpected the rest of the flow to continue using the new branch name.\n\nrdvoskin@MT-24 platform % git push\n\nfatal: The upstream branch of your current branch does not match\n\nthe name of your current branch.  To push to the upstream branch\n\non the remote, use\n\n\n\n    git push origin HEAD:PLT-51\n\n\n\nTo push to the branch of the same name on the remote, use\n\n\n\n    git push origin HEAD\n\n\n\nTo avoid automatically configuring an upstream branch when its name\n\nwon't match the local branch, see option 'simple' of branch.autoSetupMerge\n\nin 'git help config'.\n\n\n\nrdvoskin@MT-24 platform % git push origin HEAD\n\nEnumerating objects: 27, done.\n\nCounting objects: 100% (27/27), done.\n\nDelta compression using up to 16 threads\n\nCompressing objects: 100% (14/14), done.\n\nWriting objects: 100% (14/14), 2.91 KiB | 993.00 KiB/s, done.\n\nTotal 14 (delta 12), reused 0 (delta 0), pack-reused 0\n\nremote: Resolving deltas: 100% (12/12), completed with 12 local objects.\n\nTo github.com:MyTechnologiesOrg/platform.git\n\n   9b7fc2a..b66bee8  HEAD -> PLT-50-2\n\nrdvoskin@MT-24 platform % git config --global push.default\nsimple\n\n\nOn Fri, Jul 19, 2024 at 4:13 PM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> Hey,\n>\n> On 2024-07-19 at 18:34:29, Roman Dvoskin wrote:\n> > Thank you for filling out a Git bug report!\n> > Please answer the following questions to help us understand your issue.\n> >\n> > What did you do before the bug happened? (Steps to reproduce your issue)\n> > I renamed an existing branch to a new name\n> > What did you expect to happen? (Expected behavior)\n> > When I git push I expected the new name to be used to match the remote branch\n> > What happened instead? (Actual behavior)\n> > I was prompted to use git push HEAD:<old_branch_name>\n> > What's different between what you expected and what actually happened?\n> > I expected for the new branch name to be used, as if it was always the branch name\n> > Anything else you want to add:\n>\n> I'm not sure I understand exactly the message that you saw here, and I\n> suspect if I don't understand, it's possible other people on the list\n> don't either. Could you copy and paste the exact output you saw here so\n> that we can see what the prompt looks like and the exact response you\n> saw? That would help us understand whether the behaviour you saw is a\n> bug or not, or if perhaps maybe the documentation is unclear.\n>\n> Also, to be sure I understand, you did something like this:\n>\n> ----\n> git branch -m foo bar\n> git push origin bar\n> ----\n>\n> and you expected the local branch `bar` to be pushed to the remote branch\n> `bar`, correct?\n> --\n> brian m. carlson (they/them or he/him)\n> Toronto, Ontario, CA\n"},{"id":"498978","messageId":"019001dada1b$f5a822e0$e0f868a0$@nexbridge.com","threadId":"61812","inReplyTo":"ZprI_wP1km8eA7HA@tapette.crustytoothpaste.net","subject":"RE: Bug report","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2024-07-19T20:40:52Z","receivedAt":"2024-07-19T20:41:08Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On Friday, July 19, 2024 4:14 PM, brian m. carlson wrote:\n>On 2024-07-19 at 18:34:29, Roman Dvoskin wrote:\n>> Thank you for filling out a Git bug report!\n>> Please answer the following questions to help us understand your issue.\n>>\n>> What did you do before the bug happened? (Steps to reproduce your\n>> issue) I renamed an existing branch to a new name What did you expect\n>> to happen? (Expected behavior) When I git push I expected the new name\n>> to be used to match the remote branch What happened instead? (Actual\n>> behavior) I was prompted to use git push HEAD:<old_branch_name> What's\n>> different between what you expected and what actually happened?\n>> I expected for the new branch name to be used, as if it was always the\n>> branch name Anything else you want to add:\n>\n>I'm not sure I understand exactly the message that you saw here, and I suspect if I\n>don't understand, it's possible other people on the list don't either. Could you copy\n>and paste the exact output you saw here so that we can see what the prompt looks\n>like and the exact response you saw? That would help us understand whether the\n>behaviour you saw is a bug or not, or if perhaps maybe the documentation is\n>unclear.\n>\n>Also, to be sure I understand, you did something like this:\n>\n>----\n>git branch -m foo bar\n>git push origin bar\n>----\n>\n>and you expected the local branch `bar` to be pushed to the remote branch `bar`,\n>correct?\n\nWould not the logical way to do this be:\ngit switch -c foo # Or however the branch is set up.\ngit push --set-upstream origin bar   # Sets the association to the remote branch\n\nI could not get the original attachment (filtered out).\n\n"}]}