How to Add and Manage Git Remote Repositories
🔹 1. Adding a Remote Repository To add a new remote repository, use the following command:
Bash
git remote add <remote-name> <remote-url>
Example:
Bash
git remote add origin https://github.com/user/repo.git
🔹 2. Checking Added Remote Repositories To view the list of currently added remote repositories, run:
Bash
git remote -v
🔹 3. Changing (Updating) a Remote Repository URL If you need to change the URL of an existing remote repository, use this command:
Bash
git remote set-url origin <new-url>
Example:
Bash
git remote set-url origin https://github.com/newuser/newrepo.git
🔹 4. Removing a Remote Repository To remove a remote repository from your local Git tracking, use:
Bash
git remote remove <remote-name>
Example:
Bash
git remote remove origin
Now you are all set to add and manage your Git remote repositories! 🚀
댓글
댓글 쓰기