[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
- [lmi-commits] [lmi] master updated (e0988be -> 3ff6c00), Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 20f6dd2 15/16: Add git instructions to copy a branch into a master subdirectory,
Greg Chicares <=
- [lmi-commits] [lmi] master 8b0a768 14/16: Invoke 'rm' without '--force', Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 3ff6c00 16/16: Rewrite for clarity, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master fa96c05 13/16: Make tracing information easier to follow, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master f8d4676 11/16: Improve and compress output trace, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master b00ad83 10/16: Remove duplicated target name; improve documentation, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 0ca7d61 09/16: Don't write env file if its name is empty or unset, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 294f232 12/16: Improve documentation, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master c10b229 08/16: Actually perform some work in the script, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master a87426e 07/16: Name temporary environment-variables file OAOO, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 01aee1e 04/16: Construct a unique temporary filename to avoid collisions, Greg Chicares, 2019/05/18