What is the difference between git am and git apply?

后端 未结 3 511
日久生厌
日久生厌 2020-12-04 07:49

Both git am and git apply can be used to apply patches. I fail to see the difference. I see a difference now: git am automatically com

3条回答
  •  再見小時候
    2020-12-04 08:12

    With git am you apply the patch so if you use git status you won't see any local changes.

    git apply enables you to make the changes in the source files as if you were writing the code by yourself, consequently git status and git diff will output the changes made in the patch you have applied, then you can fix/add more changes and submit them together as one new patch.

提交回复
热议问题