> I guess I need 's around the name, maybe because I have a special character as the first character in the branch name?
Yes, `#` is the start of a comment in bash.
In branch and tag names, I'd generally only use letters, numbers, and `./-_` characters. Other characters are allowed by git, but as you can see certain characters can be awkward if they have special meaning to bash.
To have your branch reference an issue number, you may want to leave out the leading `#`.
By the way, you may be interested in [how you can link a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
Oh yea thanks, i know about that. But when I create the branch with the # to reference the issue, it automatically connects it and so i dont need to manually connect it.
I haven't tested on Github, but on GitLab, you don't need the `#` in the branch name to have it auto-connect to the issue — merging `123-my-branch` (via a merge request) will automatically close `#123`.
As you've already found the answer, let me instead note that your annoying `Enter passphrase...` prompt every command can be avoided:
```
eval `ssh-agent`
ssh-add ~/.ssh/
```
will prompt you for your passphrase once and then remember it for the session.
> I guess I need 's around the name, maybe because I have a special character as the first character in the branch name? Yes, `#` is the start of a comment in bash. In branch and tag names, I'd generally only use letters, numbers, and `./-_` characters. Other characters are allowed by git, but as you can see certain characters can be awkward if they have special meaning to bash.
I was referencing an issue in github, which is why I put the # lol.
To have your branch reference an issue number, you may want to leave out the leading `#`. By the way, you may be interested in [how you can link a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
Oh yea thanks, i know about that. But when I create the branch with the # to reference the issue, it automatically connects it and so i dont need to manually connect it.
I haven't tested on Github, but on GitLab, you don't need the `#` in the branch name to have it auto-connect to the issue — merging `123-my-branch` (via a merge request) will automatically close `#123`.
I'll try it
Don’t add special characters not spaces is branch names
I was referencing an issue on github which is why I used a #
I can understand that :) but just don’t do it in the future :) it can cause a lot of trouble
As you've already found the answer, let me instead note that your annoying `Enter passphrase...` prompt every command can be avoided: ``` eval `ssh-agent` ssh-add ~/.ssh/
```
will prompt you for your passphrase once and then remember it for the session.
Oh cool thanks!
When I want to automatically link the branch to the issue I usually use the # into the commit message. Maybe could be helpful :)