git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Feature Suggestion for Branch Switching/Creation in Git

From
AVAnatolij Vasilcenko <anatolij_vasilcenko@gmx.net>
Date
Apr 28, 2025, 09:30 UTC
Message-ID
<trinity-632843c8-90da-49ad-b5d1-cbf16f2d77ed-1745832654527@trinity-msg-rest-gmx-gmx-live-67758444c9-5pbm9>
Dear Git Development Team,
I hope this email finds you well. My name is Anatolij Vasilcenko, and I wanted to share a small suggestion for improving the Git experience based on a recent scenario I encountered.
While working with a branch that had an upstream counterpart, I mistakenly created a local branch using git branch <branch-name> (instead of 'git checkout..'), unaware that a remote branch with the same name already existed. This resulted in a local branch that wasn’t linked to the remote one, causing confusion and unexpected behavior.
It seems that Git currently doesn’t notify users in such cases, which can lead to accidental missteps. A simple warning could make things clearer, such as: "A branch with this name already exists on the remote. Would you like to connect this branch to the remote counterpart?"
Adding this kind of confirmation step would be helpful in avoiding such situations, particularly in collaborative environments. I believe this small change could enhance usability for many users.
Thank you for considering this suggestion, and for all the work your team puts into making Git the exceptional tool it is. Please feel free to reach out if further details would be helpful.
Kind regards,
Anatolij Vasilcenko
Message 1 of 1 in “Feature Suggestion for Branch Switching/Creation in Git”
  1. Anatolij VasilcenkoApr 28, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.