Re: why is git destructive by default? (i suggest it not be!)
- From
- David Jeske <jeske@google.com>
- Date
- Aug 14, 2016, 00:43 UTC
- Message-ID
- <willow-jeske-01l5oJ=64=91FEDjCgQT>
- In-Reply-To
- <willow-jeske-01l5oEsvFEDjCjRW>
As a more practical question, how do I do this workflow illustrated below?
It's sort of similar to the workflow that "git stash" is trying to support, except that I have a bunch of commits instead of a bunch of uncommitted-changes.
I pull a repository that looks like this:
. a<--b<--c <--master
Then I hack away to this, and then throw my own branch on the end, along with master:
. a<--b<--c<--d<--e<--f<--g <--master (jeske) . <--feature1 (jeske)
While the server looks like this:
. a<--b<--c<--1<--2<--3 <--master (server)
I want to get my repository to look something like this:
. a<--b<--c<--1<--2<--3 <--master (jeske) . \ . d<--e<--f<--g <-- feature1 (jeske)
So I can then do this:
. a<--b<--c<--1<--2<--3<--zz <--master (jeske) . \ . d<--e<--f<--g <-- feature1 (jeske)
..and then push zz onto the server after 3.
..and I want to do it with safe commands that won't leave any dangling references. (say if I forget to put the feature1 branch on)
How do I do that?