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 00:57] – rpjday | git_establishing_tracking_branches [2019/04/04 01:53] (current) – [Track upstream branch from existing branch] rpjday | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * '' | * '' | ||
| + | < | ||
| + | $ 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=] < | ||
| + | </ | ||
| + | |||
| + | Create the branch to be set to track: | ||
| + | |||
| + | < | ||
| + | $ git checkout -b rday | ||
| + | </ | ||
| + | |||
| + | Examples while on branch '' | ||
| + | |||
| + | < | ||
| + | $ git branch -u ln/akpm | ||
| + | $ git branch -u ln/akpm myakpm | ||
| + | $ git branch --set-upstream-to=ln/ | ||
| + | $ git branch --set-upstream-to=ln/ | ||
| + | </ | ||
| + | |||
| + | ===== 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 | ||
| + | </ | ||