Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I modify the folder name inside the zip downloaded from my github repo?

Tags:

github

The folder name of the zip downloaded from github is like %repository-name%-master, but I need that folder just as %repository-name%

Can this be done?

like image 216
christophrus Avatar asked Apr 17 '13 23:04

christophrus


People also ask

How do I change my GitHub repository folder name?

Way 1: Rename using GitHubStep 1: Open GitHub. Step 2: Open the repository to rename any file in that repository. Step 3: Open the file which we want to rename. Step 4: Click the edit button and rename the file.

Can I rename my repository folder?

You can rename a repository if you're either an organization owner or have admin permissions for the repository.

How do I rename a file in GitHub?

In your repository, browse to the file you want to rename. In the upper right corner of the file view, click to open the file editor. In the filename field, change the name of the file to the new filename you want. You can also update the contents of your file at the same time.


1 Answers

You cannot modify the name of the root directory contained in an archive from github.

Even when you download master:

wget https://github.com/user/repo/tarball/master

You will get a file named 'master', but:

tar xpvf master

The tar xpvf will give you a repo-xxxx directory.
I usually follow with:

mv repo-* repo
like image 156
VonC Avatar answered Sep 24 '22 11:09

VonC