Re: [dev] [suckless] Migration to git
On Thu, Feb 14, 2013 at 01:01:03PM +1100, Sam Watkins wrote:
> > I've been working with git lately, trying to do some unusual things,
> > and I need to say this is one of the least suckless pieces of software
> > I've ever worked with. It's complex, obscure, inconsistent, quirky...
>
> > tell what you did
>
> Ok, here is one day in the life of messing about with git.
>
>
> Let's say you wanted to get rid of all history from a repo, just keep
> the current commit. Git lets us rewrite history, so this should be
> easy, right? Wrong. I won't tell you how long it took to find this
> weird technique:
>
> [...]
>
> But ordinary things are famously weird in git, also.
>
It's a one-liner:
$ git reset $(git commit-tree -m "foobar" HEAD^{tree})
Pretty fast:
git reset $(git commit-tree -m "foobar" HEAD^{tree}) 0.00s user 0.01s system 70% cpu 0.009 total
`git gc` also works perfectly fine after running that.
Received on Thu Feb 14 2013 - 07:24:28 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 21 2013 - 19:21:30 CET