DEV Community

Pandiyan Murugan
Pandiyan Murugan

Posted on • Originally published at efficientuser.com

4 1

Quick edit of Git repo URL in windows

Disclaimer: Not an actual post, just step by step process list.

Step 1:

Open .git folder in the repository root folder (enable view hidden folder settings to view this folder).

Step 2:

Open the config file in the .git folder using any text editor.
(.git\config)

Step 3:

Replace the URL path under remote origin with your new URL.

example:

[remote “origin”]
url = https://github.com/PandiyanCool/pandiyan.me

Step 4:

Save the config file.

Step 5:

Everything is complete, continue your coding.

Happy Coding!

Top comments (1)

Collapse
 
waylonwalker profile image
Waylon Walker • Edited

After step 1 run

git remote set-url origin <url-to-your-git-repo.git>

I wouldn't recommend reaching into the .git directory.

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more