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

Re: git has issues with international characters in branch names

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 5, 2019, 18:14 UTC
Message-ID
<20190505181444.GA7458@genre.crustytoothpaste.net>
In-Reply-To
<trinity-aa2c53fa-25e5-49df-83f9-68f310683943-1557052051546@3c-app-gmx-bs61>
On Sun, May 05, 2019 at 12:27:31PM +0200, Ax Da wrote:
Show 12 quoted lines
> The documentation doesn't seem to be clear about which characters are allowed as branch names.
> 
> We have been using umlauts and apostrophes in our branch names, and both are having issues:
> 
> - apostrophe:
>   git removes the apostrophes from the branch name when creating/pushing a branch.
>   In our TFS server repository we're having the same branch name twice: Once with apostrophes,
>   and once without. And I don't seem to be able to delete the one without apostrophes.
> 
> - umlauts:
>   The umlauts are not correctly interpreted when SMB is used. "gemäss" becomes "gem<C3><A4>ss".
>   (See images attached.)

I don't think Git itself has a problem with Unicode. I literally just the other day created a branch with a Unicode apostrophe and pushed it to GitHub successfully using macOS. It is possible that TFS doesn't like them; that depends on the hosting solution you use. If you're seeing problems with TFS, I'd reach out to Microsoft for assistance.

It looks also like the Git CMD interface isn't rendering them properly. I would try using Git Bash instead, and if that doesn't work, please report that to Git for Windows. The folks there will have a better idea about the portability issue that's occurring; I expect there's a wart there somewhere between UTF-8 and UTF-16. It may also be that SMB is not a good choice for sharing repositories if you require internationalization, or you may need to change the character set your SMB server uses.

You may also, depending on which version of Windows you are using, have better luck at the command line with Windows Subsystem for Linux.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Ax DaNext: Jacob Keller
Message 2 of 3 in “git has issues with international characters in branch names”
  1. Ax DaMay 5, 2019
  2. brian m. carlsonMay 5, 2019
  3. Jacob KellerMay 6, 2019

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.