How To Change A Repository Name In Github
This browser is no longer supported.
Upgrade to Microsoft Edge to accept advantage of the latest features, security updates, and technical support.
Rename a Git repository in your project
Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018
Visual Studio 2019 | Visual Studio 2017 | Visual Studio 2015
You lot can rename a Git repository in a project from your spider web browser. Later you rename the repo, each member of your team should take a few steps to re-enable their dev machines to connect to the repo on the server.
Prerequisites
- To rename a repository, you must accept Rename Repository permissions on your Git repo.
- If you want to utilize az repos update control to rename a repository, be sure to follow the steps in Get started with Azure DevOps CLI.
Rename the repository
- Browser
- Azure DevOps CLI
-
From the web portal, select Repos, Files.
-
From the repo drop-downward, select Manage repositories.
-
Select the name of the repository from the Repositories list, cull the ... card, and so choose Rename repository.
-
Rename the repository by typing the repo's new name and selecting Rename.
-
- From the web portal, open the projection administration page for your project and select Version Control.
-
Select the repo you lot desire to rename under Git repositories on the left and select .... Select Rename repository... from the menu.
Notation
If the Repositories pane is not expanded, select > to expand it and brandish the listing of repositories.
-
Enter a new repo name in the Repository proper name field in the dialog, then select Rename.
Update the Git remotes on your dev machines
Git uses remote references to fetch and button changes between your local copy of a repository and the remote version that is stored on the server. After a Git repository or project has been renamed, you should update your remote references. Update your references to that the remote repository URL contains the project and the repository name.
Each fellow member of your squad must update their local Git repos to continue connecting from their dev machines to the repo in the project. The instructions below show how to update the remotes for the Fabrikam Mobile repo that was renamed to Fabrikam.
Become the new URL for the repo
-
Select Repos, Files.
-
Select Clone in the upper-right corner of the Files window and re-create the clone URL.
-
Select Clone in the upper-right corner of the Lawmaking window and copy the Clone URL.
Update your remote in Visual Studio
-
Connect to the repo.
-
Open up the project settings.
-
Open the repo settings.
-
Edit the fetch and push remote references and paste the URL that you lot copied from the remote repo.
Update your remote in older versions of Visual Studio from the command prompt
If you use an older version of Visual Studio or work with Git from the command prompt:
-
Open up the Git control prompt.
-
Get to the local repository and update the remote to the URL y'all copied from the remote repo.
git remote set-url origin {URL_you_copied_from_the_remote_repo}
Refresh Team Explorer
-
Refresh Squad Explorer.
-
Squad Explorer now shows the updated repo proper noun.
Q&A
Q: Can I rename my repo again? Can I reuse an one-time repo name?
A: Yes
Q: What if I named my remote something other than the default origin?
A: If y'all're using:
-
Visual Studio 2015, and then edit the remote with the name y'all used.
-
An older version of Visual Studio or the command prompt, then run this control:
git remote set-url {remote_name} {URL_you_copied_from_the_remote_repo}
Related manufactures
- Prepare Git repository settings and policies
Feedback
Submit and view feedback for
Source: https://docs.microsoft.com/en-us/azure/devops/repos/git/repo-rename
Posted by: cooperhavine.blogspot.com
0 Response to "How To Change A Repository Name In Github"
Post a Comment