Re: Question about 'branch -d' safety
- From
- Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
- Date
- Dec 30, 2009, 21:08 UTC
- Message-ID
- <20091230210837.GA12935@vidovic>
- In-Reply-To
- <20091230121238.6117@nanako3.lavabit.com>
The 30/12/09, Nanako Shiraishi wrote:
Show 10 quoted lines
> Quoting Nicolas Sebrecht <nicolas.s.dev@gmx.fr> > > > But even with it, we would hit some foreign workflow. Think: Bob > > directly push to Alice and Alice does the same to Bob. I don't use this > > kind of workflow myself but I consider them to be sensible enough to > > have our attention. > > Here is what I think about your scenario. > > Bob directly pushes to Alice and Alice does the same to Bob, both to their refs/remotes/<other person>/ tracking branches
We can't say. They both may have refs/remotes/<same_id> .
Bob: $ git branch -d a_branch
Now, Bob has the "I don't want to loose" commit known in refs/remotes/<same_id> only.
Alice, some time later: $ git push -f <same_id> <foo>:<a_branch>
Bob "lose" his commit.
I admit it is a very uncommon use case and Bob can still use the reflog.
-- Nicolas Sebrecht