13

I'm a Git noob and using GitExtensions (GE) I'm constantly having problems with "{name} is not a valid remote name". One minute GE will not allow me to add the name, then if I try to re-add it without a single name/path change GE accepts it, then later I have the above error message again randomly. One minute I'll be able to commit/push to the repo with that name, the next I can't.

I've done a bit of Google-Fu and can't seem to find anything on this.

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
  • 1
    See http://stackoverflow.com/questions/11947587/is-there-a-naming-convention-for-git-repositories and http://gravitydept.com/blog/devising-a-git-repository-naming-convention/ – Arnaud Denoyelle Jan 21 '14 at 15:57
  • 2
    As far as `git` is concerned, if it's an acceptable file name for your combination of OS and file system, then it's an acceptable repo name. GitExtensions and other layers above `git` may impose other restrictions... – twalberg Jan 21 '14 at 17:27
  • So far through testing it seems that spaces aren't allowed. Or at least on my system + GE, it causes all kinds of issues (Win 8 Pro, x64). – J. Scott Elblein Jan 23 '14 at 17:06

1 Answers1

11

Git repository name can be logically anything, but it's slug (how it is stored to disk and how it's cone URL can be formed) can differ from the name. However, this is totally tool specific.

I've seen some Git hosting tools that allow wide set of characters to be used as repo name but many of them are converted into dash when forming the slug. That causes the original name to have a role of "display name" in the web UI, and most of the developers won't enjoy that when working at the shell side.

In GitHub, the name may have

  • letters,
  • numbers,
  • dash (-)
  • _
  • .

In GitLab, it is similar. I've seen an error Path can contain only letters, digits, '_', '-' and '.'. Feature request to change this in GitLab

Ville Laitila
  • 1,187
  • 11
  • 18