From dccce3abbef79b8020b3672db0f6746ba231eea9 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Sun, 8 Oct 2017 10:32:23 -0400 Subject: [PATCH] Add that deleting a remote also deletes its config settings and remote branches. Also, pedantically, since the topics are covered in the order of renaming, then removal, change the section heading to match that. --- book/02-git-basics/sections/remotes.asc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/02-git-basics/sections/remotes.asc b/book/02-git-basics/sections/remotes.asc index 56d3e0d32..2a4a379fc 100644 --- a/book/02-git-basics/sections/remotes.asc +++ b/book/02-git-basics/sections/remotes.asc @@ -192,7 +192,7 @@ $ git remote show origin This command shows which branch is automatically pushed to when you run `git push` while on certain branches. It also shows you which remote branches on the server you don't yet have, which remote branches you have that have been removed from the server, and multiple local branches that are able to merge automatically with their remote-tracking branch when you run `git pull`. -==== Removing and Renaming Remotes +==== Renaming and Removing Remotes You can run `git remote rename` to change a remote's shortname.(((git commands, remote))) For instance, if you want to rename `pb` to `paul`, you can do so with `git remote rename`: @@ -216,3 +216,5 @@ $ git remote remove paul $ git remote origin ---- + +Once you delete the reference to a remote this way, all remote-tracking branches and configuration settings associated with that remote are also deleted.