๐ Manage Remotes
Enhance your workflow by effectively managing remote repositories with these essential Git commands.
โ Add a New Remote
Adds a new remote named upstream
pointing to the specified repository URL. This is useful for tracking the original repository when youโve forked it.
git remote add upstream https://github.com/username/repo.git
๐ Fetch All Remotes
Fetches updates from all configured remotes. This command retrieves the latest changes from each remote repository without merging them into your local branches.
git fetch --all
๐งน Prune Stale Remote References
Removes references to remote branches that no longer exist on the origin
remote. This helps keep your list of remote branches clean and up-to-date.
git remote prune origin
๐ View All Remotes
Displays all configured remotes along with their URLs. This is useful for verifying the remote repositories your local repository is connected to.
git remote -v