I could not find any documentation on what the maximum length of a Github (not Git) branch name is. So, what is it?
Answer: 62-250 characters
Explanation: The most technically correct answer is 250 bytes. To arrive at this conclusion, I just brute forced branch names of various lengths and characters to figure out what the Github limit is. When using a string composed of purely valid ASCII character, the limit is 250 characters which totals 250 bytes if we assume UTF-8 encoding is being used. When using all 32-bit/4-byte Unicode characters (all 😊 characters in my test), the limit is 62 characters which totals 238 bytes. While I didn't test it explicitly, I think it's safe to assume the same rules apply to any arbitrary mix of characters - total bytes being the constraint, not character count.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With