Issue with creating branch name using "git switch -c"
🐞 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.
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?
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 "-"
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 "-"
If the issue is resolved then please close the issue.
@linahamila what's your stat?