Git via Email Getting Started


Published:   August 1, 2020

Tags:

Simple way to that is via:

  • To create a patch: git format-patch <branch-you-want-to-send-patch-to> -o <patches-folder>

    A patch file is created, for me it was patches/0001-second.sh.patch, below is a sample patch.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    From d84a8864289616c462827fead5351fb66b86cc3f Mon Sep 17 00:00:00 2001
    From: Sumit Murari <sumit.murari@emailaddr.com>
    Date: Fri, 31 Jul 2020 23:15:12 +0530
    Subject: [PATCH] second.sh
    
    ---
    second.sh | 1 +
    1 file changed, 1 insertion(+)
    create mode 100644 second.sh
    
    diff --git a/second.sh b/second.sh
    new file mode 100644
    index 0000000..e019be0
    --- /dev/null
    +++ b/second.sh
    @@ -0,0 +1 @@
    +second
    --
    2.24.0
    
  • To apply a patch: git am

    • am is for apply mailbox or Apply a series of patches from a mailbox

References: https://www.youtube.com/watch?v=QtXj9tt-RUE



Let me know if you have any questions or comments.
It will help me to improve/learn.


< Older   Further Reading   Newer >