Skip to content

Instantly share code, notes, and snippets.

@Rihovardini
Last active June 30, 2018 21:24
Show Gist options
  • Save Rihovardini/36fa1d4cfeae6492780bc19f1d2cdf90 to your computer and use it in GitHub Desktop.
Save Rihovardini/36fa1d4cfeae6492780bc19f1d2cdf90 to your computer and use it in GitHub Desktop.
В даному прикладі було описано різниця між коммандою git rebase та git merge.

Різниця між rebase i merge

Різниця в тому, що git rebase при злитті водображає історію комітів не попорядку, а git merge попорядку.

Результат після git rebase:

C:\Users\andri\Desktop\advanced>git log
commit 218a6959f8742ccf25cf7e0da794d5cdde933939 (HEAD -> master)
Author: Ihor Andriiv <[email protected]>
Date:   Sat Jun 30 23:45:05 2018 +0300

    Commit -3

commit 25f6d2e1a2f1179be4f00ea8289216a4b996580a
Author: Ihor Andriiv <[email protected]>
Date:   Sat Jun 30 23:43:32 2018 +0300

    Commit -1

commit d1ce9ed732d304d4a29abebf08e70a4b2542a4e8 (dev)
Author: Ihor Andriiv <[email protected]>
Date:   Sat Jun 30 23:45:45 2018 +0300

    Commit -4

commit 8e7dede239d11fd4ea107b97dd6ae420672ff334
Author: Ihor Andriiv <[email protected]>
Date:   Sat Jun 30 23:44:27 2018 +0300

    Commit -2

commit a94adc994e1be49c14aa924c1f239120a9880e73
Author: Ihor Andriiv <[email protected]>
Date:   Sat Jun 30 23:41:35 2018 +0300

    Added html file

Використання git merge:

C:\Users\andri\Desktop\advanced>git log
commit 850e3a40813ac8375cbc09c212d4a449e88b8f17 (HEAD -> master)
Merge: 13dc23a db1e9c7
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:05:22 2018 +0300

    Merge branch 'dev'

commit db1e9c7bf095d9a491107dabe01ecbab854c6602 (dev)
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:04:44 2018 +0300

    Merge - 4

commit 13dc23a52d949dfc949983927755954219b8b754
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:04:07 2018 +0300

    Merge - 3

commit 9e0823946cb958966c1ab9b5bb5f689c81d90e26
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:03:34 2018 +0300

    Merge - 2

commit 148958cc53cbe94d68c87a7b4070fc963756f462
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:02:55 2018 +0300

    Merge - 1

commit 35c6e3599fa454f1aaebaa69c28c6275aa64d7d9
Author: Ihor Andriiv <[email protected]>
Date:   Sun Jul 1 00:01:30 2018 +0300

    Added html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment