[Numpy-discussion] Can we freeze the subversion repository and move to github this week?

David david at silveregg.co.jp
Wed Sep 15 05:55:46 EDT 2010


On 09/15/2010 05:58 PM, Gael Varoquaux wrote:
> On Wed, Sep 15, 2010 at 05:10:53PM +0900, David wrote:
>> It is very difficult to actually lose data with git thanks to the
>> reflog:
>> http://www.gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html
>
> Unless you use the 'force' switches. I am trying very hard not to
> use them, as I have been advised by several good git users.

Well, yes and no. For example, you can not loose commits with any 
command that I know of thanks to the reflog (and this is true even if 
you use really "hard" commands like git reset --hard somecommit).

>
> But I keep getting in situations where people tell me that I need to use
> one of these switches. It's always a bit hard to explain how I get there,
> but I'll try and do so, so that knowledgeable people can advice me on the
> right solutions.
>
> Here is an example (in chronological order):
>
>   1) Branch out a feature branch 'feature' from master.
>
>   2) Develop in feature branch (cycle of code/commit...)
>
>   3) Hot bug on master, checkout master, attempt to fix bug. Bug fix
>      induces other bugs, cycle of code/commit to fix them.
>
>   4) Decide that bug fix is not mature enough to push, but feature branch
>      got reviewed and is.
>
>   5) Discover that I can't push from feature to origin/master. Conclude
>      that I must merge back in master locally.
>
> Now I have a problem: at step 1 I should have created a branch. I did
> not. I need to go back and create a branch. This was happening at a
> sprint, and people that know git better than me helped me out. But the
> only way we found to sort this out was to create a branch at step 1,
> merge the branch with master, and 'reset -a' master at step 1. I thought
> it over quite a few times, and did not loose any data. However, I was
> very uncomfortable with the process (the 'reset -a').

I am not sure I understand your issue exactly. Do you mean you put some 
commits in the wrong branch ? I don't see how reset is related to that - 
I mean, I have used git for two years, and I don't even know what reset 
-a does, much less used it :)

cheers,

David



More information about the NumPy-Discussion mailing list