Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_adding_remotes [2019/03/08 12:01] – [Fetching the new remote] rpjday | git_adding_remotes [2019/03/08 14:46] (current) – [Fetching the new remote] rpjday | ||
|---|---|---|---|
| Line 57: | Line 57: | ||
| in-pack: 6542717 | in-pack: 6542717 | ||
| packs: 1 | packs: 1 | ||
| - | size-pack: | + | size-pack: |
| prune-packable: | prune-packable: | ||
| garbage: 0 | garbage: 0 | ||
| Line 91: | Line 91: | ||
| in-pack: 6586085 | in-pack: 6586085 | ||
| packs: 2 | packs: 2 | ||
| - | size-pack: | + | size-pack: |
| prune-packable: | prune-packable: | ||
| garbage: 0 | garbage: 0 | ||
| Line 97: | Line 97: | ||
| $ | $ | ||
| </ | </ | ||
| + | |||
| + | Branches: | ||
| + | |||
| + | < | ||
| + | $ git branch -a | ||
| + | * master | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ===== Working with the new remote ===== | ||
| + | |||
| + | ==== Check out a branch ==== | ||
| + | |||
| + | As long as a branch name is unique across all remotes: | ||
| + | |||
| + | < | ||
| + | $ git checkout akpm | ||
| + | Branch ' | ||
| + | Switched to a new branch ' | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ git branch -vv | ||
| + | * akpm | ||
| + | master 610cd4eadec4 [origin/ | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ==== Explicitly track a remote branch ==== | ||
| + | |||
| + | If there is a conflict with branch names: | ||
| + | |||
| + | < | ||
| + | $ git checkout -b lnmaster --track ln/master | ||
| + | Branch ' | ||
| + | Switched to a new branch ' | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ===== Deleting a remote ===== | ||
| + | |||
| + | < | ||
| + | $ git fsck --no-reflogs | ||
| + | Checking objects: 100% (6708499/ | ||
| + | Checking connectivity: | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ git remote remove ln | ||
| + | $ git remote | ||
| + | origin | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | |||