Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename folder on GitHub

Tags:

git

github

I have created a repository on Linux where one folder name contains a colon (':'). Now I want to clone it to a Windows system. Because a colon is not allowed in path names on Windows I get the message:

error: Invalid path (...)

I don't have access to a Linux system now. Is there a possibility to rename the folder via the GitHub web interface?

Note: I am the only one using this repository.

like image 736
Erwin Rooijakkers Avatar asked Jun 01 '26 12:06

Erwin Rooijakkers


2 Answers

You can move a file in a new location from GitHub API, which isn't practical if you have a lot of them.

An alternative way is to use docker/machine (see get started) to

  • pull any ubuntu image,
  • make a Dockerfile installing git,
  • docker run -it --rm this new image,
  • clone your repo there,
  • do a git mv, add, commit and push back.
like image 84
VonC Avatar answered Jun 03 '26 07:06

VonC


I don't think it's possible to rename directory, since Git doesn't operate directories. But you can try to move all files from that directory to a new one (empty directory won't be created by git clone). How to move file is described in the Github documentation.

like image 26
Yaroslav Admin Avatar answered Jun 03 '26 08:06

Yaroslav Admin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!