lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 20f6dd2 15/16: Add git instructions to copy a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 20f6dd2 15/16: Add git instructions to copy a branch into a master subdirectory
Date: Sat, 18 May 2019 20:53:38 -0400 (EDT)

branch: master
commit 20f6dd21336a80c711110b1a00ee9b9de24debb3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Add git instructions to copy a branch into a master subdirectory
    
    Motivation: To delete the odd/source_script_in_makefile branch, yet
    retain its history in the repository. Given the circumstances, it
    actually was possible to "replay" the history into the permanent gwc/
    subdirectory. Deleting the files there will not remove their history.
    
    It would have been better, of course, to develop this demonstration
    in gwc/ rather than in a branch.
---
 gwc/develop1.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index b1d1b25..377c186 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -79,6 +79,11 @@ git checkout odd/foo
 git commit sandbox_test.cpp
 git checkout master
 git push origin odd/foo
+  # (to copy to a subdir before deletion, so it's in permanent history)
+  # (this works only if all modified files are unique to the branch)
+git checkout master
+git format-patch --output-directory=/tmp/patch/ master..odd/foo
+git am --directory=gwc /tmp/patch/*
   # (to expunge branch if later cherry-picked)
 git branch --delete odd/foo
 git push origin --delete odd/foo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]