Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pages/common/git-remote.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#git remote

> Manage set of tracked repositories (“remotes”)

- Show a list of existing remotes, their names and URL

`git remote -v`

- Add a remote

`git remote add {{remote_name}} {{remote_url}}`

- Add a remote and run fetch on it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really such a common use case? I'd suggest instead having the command to change the URL of a remote, which I personally have had to do more than once (e.g. after forgetting to make a clone of a github repo in the web interface before cloning to my machine, so I could push to it).

Otherwise, great addition!


`git remote add -f {{remote_name}} {{remote_url}}`

- Remove a remote

`git remote remove {{remote_name}}`

- Rename a remote

`git remote rename {{old_name}} {{new_name}}`