[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 193164f 1/3: Improve a git-branch recipe
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 193164f 1/3: Improve a git-branch recipe |
Date: |
Mon, 21 Sep 2020 13:19:14 -0400 (EDT) |
branch: master
commit 193164fba443dc0b4efd8b24cdd54c2fcc0c7db5
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve a git-branch recipe
---
gwc/develop1.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index 99d4cb6..7c3b886 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -100,10 +100,14 @@ git commit sandbox_test.cpp
git switch master
git push origin odd/foo
- # to transplant already-pushed commits to a new branch
+ # to transplant already-pushed commits to a new branch--see:
+ # https://lists.nongnu.org/archive/html/lmi/2020-09/msg00034.html
git branch odd/foo
git reset --keep origin/master
- # ...and don't ever rebase that new branch
+ # specify upstream on the first push (ignore if it's never pushed)
+git push --set-upstream origin odd/foo
+ # ...and, if that branch is (later) to be rebased on 'master', be
+ # sure to use either '--no-fork-point' or an explicit branch name.
# (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)