File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
10
10
For a steady stream of TILs from a variety of rocketeers, checkout
11
11
[ til.hashrocket.com] ( https://til.hashrocket.com/ ) .
12
12
13
- _ 538 TILs and counting..._
13
+ _ 539 TILs and counting..._
14
14
15
15
---
16
16
@@ -166,6 +166,7 @@ _538 TILs and counting..._
166
166
- [ List Untracked Files] ( git/list-untracked-files.md )
167
167
- [ Move The Latest Commit To A New Branch] ( git/move-the-latest-commit-to-a-new-branch.md )
168
168
- [ Reference A Commit Via Commit Message Pattern Matching] ( git/reference-a-commit-via-commit-message-pattern-matching.md )
169
+ - [ Rename A Remote] ( git/rename-a-remote.md )
169
170
- [ Renaming A Branch] ( git/renaming-a-branch.md )
170
171
- [ Resetting A Reset] ( git/resetting-a-reset.md )
171
172
- [ Show All Commits For A File Beyond Renaming] ( git/show-all-commits-for-a-file-beyond-renaming.md )
Original file line number Diff line number Diff line change
1
+ # Rename A Remote
2
+
3
+ If you just added a remote (` git remote add ... ` ) and messed up the name or
4
+ just need to rename some existing remote, you can do so with the ` rename `
5
+ command.
6
+
7
+ First, let's see the remotes we have:
8
+
9
+ ``` bash
10
+ $ git remote -v
11
+ origin https://github.com/jbranchaud/til.git (fetch)
12
+ origin https://github.com/jbranchaud/til.git (push)
13
+ ```
14
+
15
+ To then rename ` origin ` to ` destination ` , for example, we can issue the
16
+ following command:
17
+
18
+ ``` bash
19
+ $ git remote rename origin destination
20
+ ```
21
+
22
+ See ` man git-remote ` for more details.
You can’t perform that action at this time.
0 commit comments