Renaming a Pages repository will continue to break any existing links to content hosted on the github.io domain or custom domains. GitHub Pages sites are not automatically redirected when their repositories are renamed at this time. You can do this by using git remote on the command line: git remote set-url origin new_url To reduce confusion, we strongly recommend updating any existing local clones to point to the new repository URL. That means you don't even have to git remote set-url (change the url of your remote GitHub repo) on your local cloned repo!Īlthough Gabriel notes in the comments that the official GitHub help page strongly recommends that you do so: Just rename away and we'll take care of the rest.Īs a special bonus, we'll also be servicing all Git clone, fetch, and push requests from previous repository locations. We're happy to announce that starting today, we'll automatically redirect all requests for previous repository locations to their new home in these circumstances. Note that since May 2013 (" Repository redirects are here!"), you can rename your GitHub repo without breaking any links: SSH = HTTPS = GIT = git:///someuser/someproject.git.That's what #1 is about.ġ The exact format of your URL depends on which protocol you are using, e.g. $ git remote add origin origin is the most common remote name, but it might be called something else.)īut if there are lots of people who are working on your project, they will all need to do the above steps, and maybe you don't even know how to contact them all to tell them. Origin set the new URL $ git remote set-url origin in older versions of Git, you might need: $ git remote rm origin So after you rename your project, you will have to tell your working copy the new URL.įirstly, cd to your local Git directory, and find out what remote name(s) refer to that URL: $ git remote -v Your working copy of Git uses this URL when you do a push or pull. footnote if your URL does not look like this). Then your project's URL will be 1 you rename your project, it will change the someproject part of the URL, e.g. Let's say your username is someuser and your project is called someproject. If you are the only person working on the project, it's not a big problem, because you only have to do #2.
0 Comments
Leave a Reply. |