This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
info:code:git [2016-08-12 08:51] andunix |
info:code:git [2018-12-06 10:07] (current) andunix |
||
---|---|---|---|
Line 6: | Line 6: | ||
Bare: | Bare: | ||
git init --bare [DIR] | git init --bare [DIR] | ||
+ | === Log === | ||
+ | See commits between branches: | ||
+ | git log master..develop | ||
===== Branches ===== | ===== Branches ===== | ||
=== List Branches === | === List Branches === | ||
Line 11: | Line 14: | ||
=== Switch Branch === | === Switch Branch === | ||
git checkout BRANCH | git checkout BRANCH | ||
+ | === Delete Branch === | ||
+ | git branch -d BRANCH | ||
+ | === Delete Remote Branch === | ||
+ | git push origin -d BRANCH | ||
+ | === List unmerges branches === | ||
+ | List branches with commits, which are not in branch REF: | ||
+ | git branch --no-merged REF | ||
+ | For example, list unmerged branches, which are not in '' | ||
+ | git branch --no-merged develop | ||
+ | === List unmerges commits === | ||
+ | List commits in branch BRANCH, which are not in branch REF: | ||
+ | git cherry -v REF BRANCH | ||
+ | For example, list commits in a feature branch, which are not in '' | ||
+ | git cherry -v develop feature/ | ||
===== Subversion ===== | ===== Subversion ===== | ||
=== Update === | === Update === | ||
Line 26: | Line 43: | ||
git flow hotfix start VERSION [BASENAME] | git flow hotfix start VERSION [BASENAME] | ||
git flow hotfix finish VERSION | git flow hotfix finish VERSION | ||
+ | ===== Diff ===== | ||
+ | If you only want the changes files between branches, you can user this: | ||
+ | |||
+ | git diff --name-status branchA..branchB | ||