Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_branch [2018/09/15 14:26] – [Types of branches] rpjday | git_branch [2019/03/06 17:35] (current) – removed rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Overview ===== | ||
| - | Some trickier operations involving branches. | ||
| - | |||
| - | ===== Types of branches ===== | ||
| - | |||
| - | Not interesting: | ||
| - | |||
| - | * '' | ||
| - | |||
| - | Interesting: | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | ===== Displaying ===== | ||
| - | |||
| - | ==== Non-verbosely ==== | ||
| - | |||
| - | < | ||
| - | $ git branch | ||
| - | dev_pdev | ||
| - | emergency | ||
| - | failed | ||
| - | fix | ||
| - | flags | ||
| - | kerneldoc | ||
| - | makefile | ||
| - | * master | ||
| - | mdio | ||
| - | nb | ||
| - | net_phy_kconfig | ||
| - | of | ||
| - | watchog | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | ==== Verbosely ==== | ||
| - | |||
| - | < | ||
| - | $ git branch -v | ||
| - | dev_pdev | ||
| - | emergency | ||
| - | failed | ||
| - | fix | ||
| - | flags | ||
| - | kerneldoc | ||
| - | makefile | ||
| - | * master | ||
| - | mdio 1397529bc401 phy: Refactor include/ | ||
| - | nb 0b07194bb55e Linux 4.14-rc7 | ||
| - | net_phy_kconfig 2a93d87ebb56 aesthetic fixes to drivers/ | ||
| - | of b4e0cbfd71d3 Remove all remaining tests and usages of " | ||
| - | watchog | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | ==== Really, really verbosely ==== | ||
| - | |||
| - | Additionally, | ||
| - | |||
| - | < | ||
| - | $ git branch -v -v (or -vv) | ||
| - | ... snip ... | ||
| - | * master | ||
| - | ... snip ... | ||
| - | </ | ||
| - | |||
| - | ===== What's merged and what isn't ===== | ||
| - | |||
| - | What is merged (into current branch or specified branch): | ||
| - | |||
| - | < | ||
| - | $ git branch --merged | ||
| - | emergency | ||
| - | flags | ||
| - | * master | ||
| - | nb | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | $ git branch --merged nb | ||
| - | nb | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | What isn't merged: | ||
| - | |||
| - | < | ||
| - | $ git branch --no-merged | ||
| - | dev_pdev | ||
| - | failed | ||
| - | fix | ||
| - | kerneldoc | ||
| - | makefile | ||
| - | mdio | ||
| - | net_phy_kconfig | ||
| - | of | ||
| - | watchog | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | ===== Which branches contain (or don't contain) a commit? ===== | ||
| - | |||
| - | < | ||
| - | $ git branch --contains v4.14 | ||
| - | dev_pdev | ||
| - | failed | ||
| - | flags | ||
| - | kerneldoc | ||
| - | * master | ||
| - | mdio | ||
| - | net_phy_kconfig | ||
| - | watchog | ||
| - | $ | ||
| - | </ | ||
| - | |||
| - | Conversely: | ||
| - | |||
| - | < | ||
| - | $ git branch --no-contains < | ||
| - | </ | ||