Last active
August 29, 2015 14:18
-
-
Save anton0xf/afdc58306a37b6644e31 to your computer and use it in GitHub Desktop.
один из способов работы с ветками
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| допустим есть такое дерево: | |
| * 1b9ea28 2015-04-02 anton0xf Merge branch 'f1' (HEAD, merge) | |
| |\ | |
| | * 7ad0246 2015-04-02 anton0xf feature1 commit 2 (f1) | |
| | * 7518c1c 2015-04-02 anton0xf feature1 commit 1 | |
| * | bc03f8d 2015-04-02 anton0xf feature2 commit 1 (f2) | |
| |/ | |
| * b68b2f6 2015-04-02 anton0xf base (origin/master, origin/HEAD, master) | |
| т.е. есть feature1 и feature2 в ветках f1 и f2 соответственно, смердженные в ветке merge. | |
| теперь в origin что-то закомитили и приняли нашу feature1: | |
| * 5cd01ce 2015-04-02 anton0xf merge feature1 (HEAD, origin/master, origin/HEAD, master) | |
| |\ | |
| * | b83e8a7 2015-04-02 anton0xf commit in master | |
| | | * 1b9ea28 2015-04-02 anton0xf Merge branch 'f1' (merge) | |
| | | |\ | |
| | | |/ | |
| | |/| | |
| | * | 7ad0246 2015-04-02 anton0xf feature1 commit 2 (f1) | |
| | * | 7518c1c 2015-04-02 anton0xf feature1 commit 1 | |
| |/ / | |
| | * bc03f8d 2015-04-02 anton0xf feature2 commit 1 (f2) | |
| |/ | |
| * b68b2f6 2015-04-02 anton0xf base | |
| а мы закомитили что-то в ветку f2, и хотим обновить состояние всех веток, | |
| и для этого мерджим свежий мастер в каждую feature ветку, а потом каждую из них в ветку merge: | |
| * 15874e4 2015-04-02 anton0xf Merge branch 'f2' into merge (HEAD, merge) | |
| |\ | |
| | * 13b32b2 2015-04-02 anton0xf Merge branch 'master' into f2 (f2) | |
| | |\ | |
| | | * 5cd01ce 2015-04-02 anton0xf merge feature1 (origin/master, origin/HEAD, master, f1) | |
| | | |\ | |
| | | * | b83e8a7 2015-04-02 anton0xf commit in master | |
| | * | | d2d3a72 2015-04-02 anton0xf feature2 commit 2 | |
| * | | | 1b9ea28 2015-04-02 anton0xf Merge branch 'f1' | |
| |\ \ \ \ | |
| | |/ / / | |
| |/| | / | |
| | | |/ | |
| | |/| | |
| | * | 7ad0246 2015-04-02 anton0xf feature1 commit 2 | |
| | * | 7518c1c 2015-04-02 anton0xf feature1 commit 1 | |
| | |/ | |
| * | bc03f8d 2015-04-02 anton0xf feature2 commit 1 | |
| |/ | |
| * b68b2f6 2015-04-02 anton0xf base | |
| тадам! у нас все ветки в актуальном состоянии и вокзал из комитов и мерджей. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment