Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_establishing_tracking_branches [2019/04/04 01:13] – rpjday | git_establishing_tracking_branches [2019/04/04 01:53] (current) – [Track upstream branch from existing branch] rpjday | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| < | < | ||
| $ git fetch ln | $ git fetch ln | ||
| + | $ git branch -a | ||
| + | * master | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | remotes/ | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ===== Track upstream branch from EXISTING branch ===== | ||
| + | |||
| < | < | ||
| + | $ git branch [-u|--set-upstream-to=] < | ||
| + | </ | ||
| - | ===== Start tracking an upstream | + | Create the branch |
| < | < | ||
| - | $ git branch [-u|--set-upstream-to=] ln/akpm [localname] | + | $ git checkout |
| </ | </ | ||
| - | Examples: | + | Examples |
| < | < | ||
| Line 28: | Line 44: | ||
| </ | </ | ||
| + | ===== Establish new tracking branch ===== | ||
| + | < | ||
| + | $ git checkout ln/ | ||
| + | $ git checkout --track ln/akpm | ||
| + | $ git checkout -b myakpm ln/akpm | ||
| + | $ git checkout -b | ||
| + | </ | ||
| + | ===== Seeing tracking branches ===== | ||
| + | |||
| + | < | ||
| + | $ git branch -vv | ||
| + | ... | ||
| + | * myakpm 1eff8dddb1af [ln/akpm] drivers/ | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ===== Unset tracking branches ===== | ||
| + | |||
| + | < | ||
| + | $ git branch --unset-upstream | ||
| + | </ | ||