Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| git_establishing_tracking_branches [2019/04/04 00:56] – created rpjday | git_establishing_tracking_branches [2019/04/04 01:53] (current) – [Track upstream branch from existing branch] rpjday | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Various ways to establish tracking branches. Use linux-next remote '' | Various ways to establish tracking branches. Use linux-next remote '' | ||
| - | * master | + | * '' |
| - | * akpm | + | * '' |
| - | * akpm-base | + | * '' |
| - | * pending-fixexs | + | * '' |
| - | * stable | + | * '' |
| + | < | ||
| + | $ 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 | ||
| + | </ | ||