Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with creating branch name using "git switch -c" #83028

Open
linahamila opened this issue Apr 2, 2024 · 2 comments
Open

Issue with creating branch name using "git switch -c" #83028

linahamila opened this issue Apr 2, 2024 · 2 comments

Comments

@linahamila
Copy link
Contributor

馃悶 Problem
When attempting to create a new branch using the command "git switch -c your-new-branch-name", if the branch name contains certain characters such as " ' " and "-", the command prompt appears as ">>" and no further commands can be executed until Ctrl+C is pressed.

馃幆 Goal
This issue is important to me as a beginner because it highlights a potential stumbling block for others who may not be aware that certain characters are not allowed in branch names. By addressing this issue, we can improve the user experience for newcomers to Git and avoid confusion in creating branches.

馃挕 Possible solutions
One possible solution could be to update the documentation mention which characters are not allowed in branch names when creating branches using Git commands. Additionally, providing error messages or prompts when attempting to use disallowed characters could help users understand why their command is not working as expected.

@kenshanta
Copy link

i don't think you are allowed to use single quotation marks when naming git branches.

On the other hand, I've been using dashes with my branch names ever since I started programing; without any errors.

Can you try to reproduce the issue and share your results for a better understanding?

@linahamila
Copy link
Contributor Author

linahamila commented May 7, 2024

i don't think you are allowed to use single quotation marks when naming git branches.

On the other hand, I've been using dashes with my branch names ever since I started programing; without any errors.

Can you try to reproduce the issue and share your results for a better understanding?

sorry there was a typo I wasn't aware of, I meant the backslash character instead of "-"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants