Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Question

How do I re-create a branch after it's merged to Master? 

Background

Even if a branch has already been merged to 'Master' and deleted, you can recreate it.

When would I need to do this? 

Answer

  1. Do a git log master: --grep=[branchname]
  2. Merge the remote-tracking branch: remotes/origin/[branchname]
  3. Checkout the branch and merge you wish to recreate: checkout -b [bramchname] [merge]

Example:  log4net branch

  1. git log master --grep=log4net
    it shows up with this merge commit:
    *commit 7706a04def9fb08ca4b88b103a13534c20026f74
    *Merge: 2b89ef5 7a10a1c
    *Author: sebastiii <sebastiii@team-mediaportal.com>
    Date:   Tue Jan 1 12:43:38 2013**
    Merge remote-tracking branch 'remotes/origin/FEAT-3273-Switch_to_log4net'*
  2. The second merge parent is 7a10a1c, so i know the branch pointed to that commit then it was merged
  3. Do a git checkout -b FEAT-3273-Switch_to_log4net 7a10a1c

This recreates  the exact same branch as it was before it was deleted

   

 

This page has no comments.