
Some bad Git situations and how I got myself out of them - emilong
http://ohshitgit.com/
======
eyelidlessness
I can't believe no one has responded yet with "use a GUI". After gaining a
basic understanding of how branches and merges work, and I do mean _basic_ ,
I've never been able to screw up a local repo with a GUI client enough that I
haven't been able to recover with the same GUI tools.

I understand that people need to know how to use their tools, but for git most
people can get away with the very basic usage that GUIs provide. If you've
made some unrecoverable mistake with an important set of changes, you can
always review the history in the same GUI and reimplement the important
changes in a new branch.

~~~
Im_a_throw_away
I'm curious: What are the best free GUI for Git?

~~~
DiThi
I'm surprised nobody mentioned Git Extensions yet. My absolute favorite Git
UI, better than my previously favorite git-cola.

[https://gitextensions.github.io/](https://gitextensions.github.io/)

------
mhw
One of the nice workflows that's already built in to the git command line
tools is this one. When you're working on a branch and realise that a commit
you made a few commits back has a mistake in it:

    
    
        # Make correcting change
        git commit --all --fixup=<ref of commit with mistake>
        # Continue working on branch, then at some point
        git rebase --interactive --autosquash
    

The --fixup option creates commits with subjects formatted like 'fixup!
previous commit subject'. --autosquash uses these subjects when building the
interactive rebase list.

Handy enough that I set rebase.autoSquash to true in my ~/.gitconfig so 'git
rebase -i' always works like this.

~~~
bennofs
Even better in combination with the `:/grep` syntax that allows you to specify
the commit by grepping the commit messages, prefering more recent commits:
`git commit --all --fixup ':/implement some feat'`.

~~~
mhw
Mmm - nice. Glad I posted it now, as I didn't know that variation!

------
dep_b
Somebody proposed to use a GUI. That doesn't solve the usability issues of
Git. There's this triangle of what the user tries to do, what the commands and
options are called and what they actually do. None of them really align,
though with some careful use you can actually make Git do what you want -
eventually.

I would like to understand what's the yearly damage of such an important tool
being so difficult to use. People committing the wrong stuff, unmergeable
messes, people not being able to correct their mistakes, there must be
thousands of Git rookies fucking up their Git repo or throwing away their work
just as I am writing this.

What would be the cost? Millions of Dollars? Perhaps even billions?

It's about as bad as 0 being a legit value for a regular pointer.

~~~
overgard
God, it's probably billions. I love git but its user interface is borderline
criminal. The sad thing is mercurial has like 95% of git's power and is waaay
easier to understand, but it never took off in a big way.

~~~
jlebar

      $ hg clone https://bitbucket.org/eigen/eigen/
      $ cd eigen
      $ time hg grep CUDA > /dev/null
      real	0m16.661s
      user	0m16.097s
      sys	0m0.531s
    
      $ git clone https://github.com/RLovelett/eigen.git
      $ cd eigen
      $ time git grep CUDA > /dev/null
      real	0m0.019s
      user	0m0.035s
      sys	0m0.057s
    

Never looked back.

~~~
witty_username
Did you run hg grep once before to keep it in the disk cache?

~~~
jlebar
It seems I cannot post a performance comparison without people asking about
disk caches. :)

First of all, if I just cloned the repos, they should be in disk cache. My
machine has 64GB of RAM.

Second of all, if they're not in disk cache, what on earth is hg doing that it
takes 16 seconds to read them all in? Eigen is not that big, and I have a fast
SSD.

Third of all, you can run the tests yourself -- I gave you the exact commands
to try. "I tried it and my results are X" is a much better contribution to the
discussion.

Fourth of all, yes, I ran the benchmarks multiple times in a row to check
whether disk cache was at play. It was not. :)

~~~
witty_username
> It seems I cannot post a performance comparison without people asking about
> disk caches. :)

Sorry, the speedup was very great so it almost seemed like something else was
causing it. Thanks for the benchmarks.

> Third of all, you can run the tests yourself -- I gave you the exact
> commands to try. "I tried it and my results are X" is a much better
> contribution to the discussion.

That's true; I'm lazy.

Actually, I was thinking more of the disk cache of loading hg, not the repo
(Python programs tend to have a great speedup through the disk cache).

------
mathieuh
I absolutely love git now.

I'm still at uni (at a highly ranked but actually crap university where we
don't learn git properly) and this year was my 'year in industry' as we call
it in the UK, and my first proper experience with git, aside from `git init`
at the end of my project and pushing it to a repo.

I've become so much more confident with git. Seriously, with one caveat (i.e.,
you haven't pushed your changes to a branch which other developers are working
on), it is almost impossible to break irrevocably. Even if you do accidentally
break master/develop/whatever, it only causes a bit of hassle and grumbling.

Highly recommend that everyone take a bit of time to learn about "undoing" git
commands, whether that's through soft resets, hard resets to origin, or the
reflog.

Reflog is also useful for figuring out how someone else broke something and
explaining what they did wrong, since you can see what branch they were on at
what commit and what commands they ran.

I think git's main problem is the somewhat arcane language it uses, and lack
of understanding of what's actually happening _behind_ those words like
"rebase", "commit", "patch", "reset" etc.

~~~
swehner
I would not expect a university to teach git. Maybe the theory of version
control systems, their history, or a comparison of different version control
systems.

But not how to use the tool.

~~~
mathieuh
Perhaps not specifically git, but ANY version control would have been good.

We were told to version control a group project, but all we were given was an
SVN repo and told "if anything goes wrong, email this address".

Personally I would expect tuition through the use of a tool, that tool doesn't
have to be git, it just so happens to be the tool I've had the most exposure
to.

------
ThrustVectoring
A somewhat lesser known git trick that's pretty much a strict improvement -
use `--force-with-lease` for force pushing instead of `--force`.

What this does is check what's on the remote branch and compare it with what
you think is on the remote branch, and only do the force if they're the same
thing. So if someone pushes a commit, the force push errors out instead of
silently overwriting it.

Basically every single time you want to force push, you probably should be
doing a `--force-with-lease` instead. I can't think of a situation where you'd
want to silently lose commits you don't know about rather than get an error.

~~~
bdhess
I also can't think of a situation where you'd want to force push to a branch
that others might be committing to.

~~~
ThrustVectoring
If they're not committing to it, --force-with-lease is the same thing as
--force, so it doesn't cost you anything.

~~~
bdhess
Costs ten keystrokes by my count. But it's not the keystrokes that trouble me,
it's the idea that one of my co-collaborators might use this feature to
"safely" rewrite history in a branch I'm also using. "Safely" being relative,
since the rest of the collaborators will have to force pull that branch later,
and rebase their pending changes.

By my reckoning, rewriting history just isn't a reasonable decision in shared
branches.

------
mabbo
One thing not covered very well was what to do if you push to origin. My
favourite way to fix this: use git revert to create an exact opposite commit
to your bad commit.

    
    
      git revert <bad commit>
      git push
    

It leaves a history of the mistake, for better or worse, but it does undo the
mistake on origin.

~~~
jryan49
Never do this on a merge commit however. Unless you are prepared:
[https://git-scm.com/blog/2010/03/02/undoing-merges.html](https://git-
scm.com/blog/2010/03/02/undoing-merges.html)

~~~
shandor
This is why rebase is so, so much better than merge. And it's infinitely
better for bisecting, too.

Simple, completely linear history for origin/master is just so powerful in
many that aspects that I'm constantly baffled why merging seems to be the flow
mostly being talked about.

Now someone usually comes and says that merges are superior for long running
branches. Which may be true in some aspects, but when you have more than one
"running" branch and you got to try and find which commits have the code
changes that only together seem to break and this is after 2 non-trivial merge
commits, you really start to wish you'd gone with rebase.

~~~
ThatGeoGuy
For those of us who are uneducated / haven't seen this before: how do you use
rebase to merge a separate branch? Are you suggesting you just `git rebase my-
branch` from master / develop? How do you coordinate this with multiple team
members. Merges appear to work better when you have multiple team members with
separate feature branches that may have some overlap (conflicts may occur, but
those can be handled as they arise).

~~~
malingo
First off, see [0] for a very helpful insight into the rebase command's
syntax.

With multiple team members (each on their own feature branch), I encourage
what I call the "pitchfork" approach [1], where the feature branches get
stacked up into an integration branch to preview what the master branch would
ultimately be when all the feature branches are merged in via pull requests.

A key part of building and recreating the pitchfork structure is git rerere
[2].

[0] [http://matthew-
brett.github.io/pydagogue/rebase_without_tear...](http://matthew-
brett.github.io/pydagogue/rebase_without_tears.html)

[1]
[https://gist.github.com/dkaminski/c8e59221bea74ab1fea615a468...](https://gist.github.com/dkaminski/c8e59221bea74ab1fea615a468e3f4cf)

[2] [https://git-scm.com/blog/2010/03/08/rerere.html](https://git-
scm.com/blog/2010/03/08/rerere.html)

~~~
ThatGeoGuy
Hey @malingo, sorry I didn't reply to this immediately, but here are some of
my initial thoughts. I apologize if this whole post sounds like a bit of a
ramble, I'm writing this late in a train of thought. First thoughts:

1) git-rerere is really cool, and can probably make things very convenient,
especially if you do several rebase operations to stack your integration
branch. Without git-rerere, I can't imagine this workflow being remotely sane
(resolving the same conflict every time you try to add an additional commit on
one of the branches would get old fast).

2) This approach could probably help in "merging" (not git-merge, but you
know) several feature branches with lots of conflicts, but does sort of rely
on "As long as you make clean commits on the correct feature branches". While
it's a laudable goal, how often can this really be the case, especially in
projects where contributors are not composed of a single, core team (i.e. open
source or research based projects)? I would think that ensuring clean commits
is hard enough without a fixed team, so I am genuinely curious how hard it is
to enforce this assumption.

See, here's the thing -> integration like this seems to work really well,
especially if you're sharing branches across the repository with several
teammates / coworkers. But what if you're not sharing branches? In the example
you provided at [1], you have three branches: A, B, and C. Because you have
access to all branches, it's easy to make an integration branch that does
master -> Ai -> Bi -> Ci, and to handle all the conflicts with rerere. Then as
A, B, C evolve and more commits are pushed, you could even have a build-bot of
some sort assist in rebuilding the integration branch and checking for
significant conflicts or errors. Of course, this all works great, but git is
distributed.

What that means in practice is you may have master and branch A on your
machine, and your two coworkers might have B and C on their machines, but none
of you have rights to push these branches to the main repository location.
This is common in BDFL-type projects, where one person or a handful of people
are the only ones capable of pushing branches to the main repo. If your
organization is split up like this, and individual developers tend to work on
fixing single issues at a time, then you really never get the opportunity to
use the integration branches, since you're only ever integrating your own
(single) branch! If there's a bottleneck on upstream whatsoever, then the
difference between this model and merging isn't really apparent, as you're not
really getting any benefit either way (rebase -i non-withstanding). It would
seem this would just kick the can down the road for the next developer to
rebase off of the new master (with A rebased/merged in) and then solve their
problems locally. This could be a significant duplication of effort if handled
poorly.

I suppose you could have an intermediate "integration" repo where everyone
pushes their branches, and build this sort of setup in assistance with some
sort of CI, but I wonder how that scales if you have > 20 issue branches. The
reason I ask this is because in the pitchfork workflow, how do you know which
branch gets integrated first, second, etc.? I'm sure there's somewhat of a
natural ordering in practice, as some issues or features probably take
priority over others for some reason or another, but what if you don't know?
What's the best way to keep the history? Certainly history isn't everything,
but you may want to bisect down the road and A -> B -> C may cause more
problems than B -> C -> A (you might not know at this point in time).
Furthermore, do you not need someone / several people working together to
resolve these conflicts? Is it sane to keep bothering your coworkers with "hey
I just made a new integration branch, what do I do about conflict X", while
they're still pushing new commits to B or C?

I think the pitchfork strategy for rebasing onto master is intriguing, and I'd
have to play with it for an extended period of time to really get answers to
some of these questions. Unfortunately, it seems that the bottleneck issue
isn't something that can be easily solved for most projects. I don't come
across many projects that allow every contributor to push branches, especially
if they allow for pull-requests of any kind (even for one-off contributions).
Nonetheless, I've definitely learned something here, and I think I understand
better why one might want to rebase instead of merge. Then again, pull-
requests are very heavily tied to merge-based flows, and if the project I'm
contributing to wants to use them, then I'm probably hooped to begin with. Git
is great for letting teams decide how they want to work, but it can be very
painful if even one contribution doesn't follow guidelines (both to break a
consistent history / commit graph, as well as if you ever have to git-bisect
over it).

[1]
[https://gist.github.com/dkaminski/c8e59221bea74ab1fea615a468...](https://gist.github.com/dkaminski/c8e59221bea74ab1fea615a468e3f4cf)

------
wyclif
If you're concerned about not knowing how to do certain things with git, and
understanding at a deeper level how git works, I highly recommend reading
Scott Chacon's "Pro Git" book:

[https://progit.org/](https://progit.org/)

~~~
pawadu
I second your recommendation, this book has saved my bacon multiple times.

But does anyone know why this project has two homes?

[https://git-scm.com/book/en/v2](https://git-scm.com/book/en/v2)

~~~
wyclif
My understanding is that the dedicated site above highlights the book itself,
while git-scm.com recommends/promotes the book.

------
froh42
With all these recipies - one thing I do whenever I attempt some stunt in git:
I assign temporary tags to every changeset that's important.

    
    
        git tag tmp
        git perform-stunt
    

This eases undoing the stunt without needing to find the "before" state from
reflog. And if you use a graphical log viewer (I like SourceTree on Mac)
you'll see the tagged state in the history view - which makes things a lot
clearer.

And to be aware what happens, there one single explanation of git that helps a
lot: [http://eagain.net/articles/git-for-computer-
scientists/](http://eagain.net/articles/git-for-computer-scientists/)

As soon as you start viewing git as a graph of nodes with branches/tags just
being "marked" nodes a lot of things make sense, and whatever "git perform-
stunt" you attempt it's easy to explain within that mental model.

~~~
ramses0
[http://www.robertames.com/blog.cgi/entries/git-in-two-ten-
mi...](http://www.robertames.com/blog.cgi/entries/git-in-two-ten-minutes.html)
... feedback welcome, but I feel like I go into a bit more depth using similar
metaphors.

------
niuzeta
The last addendum reminds me of this inexorably relevant xkcd entry:
[https://xkcd.com/1597/](https://xkcd.com/1597/)

~~~
codeulike
Shhhh ... we all have to pretend we do git properly.

------
glandium
> Oh shit, I accidentally committed to the wrong branch!

Other ways to do it (that don't require to retype the commit message): \-
rebase onto the correct branch:

    
    
      git branch foo
    
      git reset --hard HEAD~
    
      git rebase --onto name-of-the-correct-branch HEAD foo
    
      git checkout name-of-the-correct-branch
    
      git merge foo
    
      git branch -D foo
    
    

\- cherry-pick

    
    
      git reset --hard HEAD~
    
      git checkout name-of-the-correct-branch
    
      git cherry-pick name-of-the-branch-you-mistakenly-committed-to@{1} (or git cherry-pick HEAD@{2})
    
    

> Oh shit, I tried to run a diff but nothing happened?!

You probably want to know `git diff HEAD` too.

Edit: formatting.

~~~
mungoman2
Or use git branch -m to rename master to something else, then checkout master
anew.

~~~
OskarS
That's clever, I'll remember that. But don't you lose all tracking information
if you do that?

~~~
phaemon
What tracking information are you referring to?

------
wfunction
Surprised there was nothing on messed-up merges or rebases. They're some of
the worst to get out of when you're not totally comfortable with git yet.

~~~
zubspace
Any points on how to continue from there? Been in a few "I give up" conditions
during rebases that I completely stopped trusting git it any way.

The thing is, some repositories on github _require_ you to commit only after
proper rebasing. But I can never in my life remember how and need to google
it...

~~~
JimDabell
To abort a screwed up merge:

    
    
        git merge --abort
    

To abort a screwed up rebase:

    
    
        git rebase --abort
    

Both of these will take you back to immediately before you began the
operation.

------
mcbain
'sudo rmdir'? I don't think that does what they think it does.

~~~
keyanp
For posterity, `rmdir` will only remove empty directories. The author
presumably should have used `rm -rf`.

~~~
hacksonx
I think the command we're looking for is 'rm -R name_of_directory'

~~~
inopinatus
Honestly, the proper command is not rm at all, because you can then have an
"oh shit I forgot something" moment. I have learned (the hard way) to retain
even an horribly broken repo, but shove it out of the way. Because disk is
cheap, repeating work is expensive.

So that example should have been:

    
    
        cd ..
        mv fucking-git-repo-dir fucking-git-repo-dir.archived.$(date +%s)
        git clone https://some.github.url/fucking-git-repo-dir.git

~~~
falsedan

      git fetch origin master && git reset --hard origin/master
    

imo

------
chriswarbo
Based on the article, and many of the comments here, I didn't realise how
comfortable I have become using git!

For example, the last "bad situation" I had to get myself out of involved
unreadable .git contents caused by filesystem corruption. If you can "rm -rf
fucking-git-repo-dir" then it's not too bad; when that fails with an IO error
is when things get interesting!

------
edem
I really like this article but there is a problem with it: what happens if I
use one of your techniques and I screw up? These steps you describe are a
black box to someone who is no git savvy yet. While these definitely help but
they propagate the "git is scary, cross your fingers" mentality. What I mean
by this is that the reader won't be any wiser after reading

> git reset HEAD~ --hard

What is ~ after HEAD? What is --hard? Is there a --deep option as well?

So I think that you could upgrade this with some annotations over the cryptic
parts with a little explanation. What do you think?

~~~
ivanhoe
On the other hand all of these options are well documented in the git book and
manual, so it's quite easy to check the details you're not sure about (and
learn something new in the process).

------
srigi
Doing mumbo-jumbo between branches with `git stash` is way to hell. Don't do
it, you lose data. This fucker will unstash changes until first conflict, then
it stop and present you with <<<<<<<ID and >>>>>>>ID which nobody understand.
Well I understand it, but never know which is which (theirs/ours label don't
help here). You try to undo everything, but then you're fucked - all unstashed
changes are removed from stash while conflicts are still there. You must be
very careful now not to lose changes. You won't succeed!

That is I believe `git stash` should be removed from git as evil data loosing
feature, not needed. Instead just make an alias `git save <TEMP_BRANCH_NAME>`
which saves your temporary work to the branch:

`save = !sh -c 'export PREV=$(git symbolic-ref HEAD|cut -d/ -f3-) && git
checkout -b "$1" && git commit -am "$1" && git checkout "$PREV"' -`

~~~
joshuahutt
You can use `git stash apply` to apply the stashed changes without removing
them from the stash.

------
Illniyar
Actually the easiest thing is simply not to care about how your log looks.

If you don't then there are ry only two things you need to know how to do:

If you didn't push to origin do an ammend. If you did, revert soft and commit
the previous code to revert it (you can also put a stash or patch to apply it
back).

Which frankly is what the article does, basically.

~~~
leejo
> Actually the easiest thing is simply not to care about how your log looks.

You need to expand on this because i don't quite understand what you mean, are
you talking about "fix typo" commits or are we getting to the level of just
committing away until things work and then not cleaning up the work later on?
The linked article doesn't cover rebasing or squashing commits, which can be
pretty powerful when used correctly.

Your commit log is the _one_ thing that is _immutably_ linked to your code
changes. Your documentation isn't, the comments in your code aren't, you will
forget why you made a change, anyone reviewing your logs needs to understand
your intention, your bug tracker will probably change several times over the
life of a project, and so on. So, make an effort to have a commit log that is
clean and comprehensive and commits that don't break tests.

I go into this in more detail in a talk i gave last week:
[https://www.youtube.com/watch?v=9OHAq8dCoS4](https://www.youtube.com/watch?v=9OHAq8dCoS4)

~~~
sergiosgc
Develop on feature branches, merge with master only when the feature is done.
Always merge with --no-ff. Then, when reviewing history, on the master branch
you can use either "git log" or "git log --first-parent master". The first log
is the complete log, with exploratory development, mistakes, backtracks and
such. The second is the clean log people keep rewriting history to obtain.

You get your cake and you can eat it too.

~~~
leejo
This is pretty much the reason i don't understand people who don't want merge
commits (the use case for rebase in the video is modifying commits in a
feature branch BTW, _not_ merging to master). You can bend git logs to your
will with the various options so there's no problem in being as verbose as
possible in commit messages and the concept of a "linear history" is a moot
point because, no matter how messy your history actual is, there's a command
line option to clear it up.

Be verbose in your commit messages and don't worry about merge commits, it
will pay dividends later.

------
Hello71
lots of these are unnecessarily complicated:

> Oh shit, I accidentally committed something to master that should have been
> on a brand new branch!
    
    
        # disappear the last commit and all changes from it
        git reset --hard HEAD^
        # make a new branch using the last commit
        git checkout -b new-branch HEAD@{1}
    

> Oh shit, I accidentally committed to the wrong branch!

first, you don't need to git-add before _and_ after stash, stash will save the
working directory and the index (as documented in the DESCRIPTION of git-
stash(1)). but for a more logical way:

    
    
        # disappear the last commit and all changes from it
        git reset --hard HEAD^
        # get onto the new branch
        git checkout new-branch
        # grab the stuff from what was on the old branch
        git cherry-pick old-branch@{1}
    

> Oh shit, I tried to run a diff but nothing happened?!
    
    
        git diff --cached
    

recommended reading for intermediate git users: the DESCRIPTIONs of all of
these commands (git-reset(1), git-checkout(1), git-cherry-pick(1), git-
diff(1)), and the entirety of gitrevisions(7).

~~~
kentor
I personally prefer this because old-branch@{1} is a little weird..

    
    
      git checkout new-branch
      git cherry-pick old-branch
      git checkout old-branch
      git reset --hard HEAD^

------
lambdacomplete
Getting to "Fuck this noise, I give up." is a very clear indication that you
aren't competent enough and you should take a GOOD course about git as soon as
humanly possible.

Shameless plug: [http://engineering.hipolabs.com/how-to-work-in-a-team-
versio...](http://engineering.hipolabs.com/how-to-work-in-a-team-version-
control-and-git/)

~~~
dahart
> Getting to "Fuck this noise, I give up." is a very clear indication that you
> aren't competent enough

I think that's a tad judgemental for two reasons:

1- because git is legitimately hard to learn. Personally I suspect git is
unnecessarily hard to learn, that command names and the concepts and workflows
I need are possible to learn and use with less effort. For many years people
around me have been asking for git help because I know how to recover from
lost stashes and use the reflog, etc., and yet I still have to google the
magic incantations for commands I use regularly because they're impossible to
remember.

2- There is actually a lot of value in being able to spin up a new repo
instantly, in knowing that you can, and in practicing it often. Not unlike the
move to VMs for development environments. Plus, there are definitely bad
situations where a fresh git clone is the simpler way to go -- just not in
this article. ;)

Anyway, I also agree with you because this blog post doesn't describe any
truly bad situations, and because for years I've seen people blowing away
their repos and starting over, and always thought to myself it was funny. It's
a drastic action that takes more work than a rebase or reflog or whatever the
problem was, and doesn't work well if you've made changes.

~~~
OskarS
1- That's certainly true, git is really hard to learn. But if you're a
developer it's worth getting comfortable with it, which means not going for
the "nuclear option" every time something weird happens. Someone on
StackOverflow has had your problem, and has the perfect fix, look that up
instead.

2- Yes, absolutely, it's good to remember that it's a fairly painless and easy
process to spin up fresh clones. Though, if all you want is a fresh copy, in
99% of cases a "git clean -xfd" will do that for you (read the man page to
find out what the options mean! man pages are your friend!). Though that one
is generally a "pull ripcord in case of emergency" type of command, "git
stash" generally suffices and avoids risk of losing data.

~~~
dahart
I totally agree, git is worth learning.

I don't recommend git stash, it frequently causes bad situations. Just branch
instead, branching is safer and just as easy as stashing. Stash is not as safe
as other git commands. From the man page: "If you mistakenly drop or clear
stashes, they cannot be recovered through the normal safety mechanisms."

------
jmiserez
This doesn't even cover half of the bad situations I've gotten myself in over
the last few years :D

Long term, it's best to thouroughly read the man pages, e.g. nicely formatted
here: [https://git-scm.com/docs](https://git-scm.com/docs)

------
mkj
Another option is to use Mercurial with hg-git to GitHub for network effects.

I've been doing that for a while for dropbear ssh, it does hit occasional
problems but is overall more pleasant than straight git.

~~~
coldpie
To each his own, of course. As a Git aficionado, I find Mercurial utterly
baffling. Branches are permanent and global? You have to clone the repo to
make a new thing I would call a branch? "hg log" shows you things that are not
in the history of your current source tree? Mind boggling.

:)

~~~
theknarf
What git calls branches is most similar to what Mercurial calls tags.

~~~
Siecje
You mean Mercurial bookmarks.

------
atsaloli
There is no substitute for understanding what's going on, especially using a
power tool like Git.

It's a cute website, and useful, I really like it. This sentence,

    
    
        Bizarrely, git won't do a dif of files that have 
        been add-ed to your staging area without this flag.
        File under ¯\_(ツ)_/¯"
    

just screams to me (a professional Git trainer), "I don't understand the Git
staging area! I don't know my Git fundamentals! Train me!"

~~~
Kratisto
Any resources you recommend for learning git in more detail?

~~~
atsaloli
1\. Our "Git Fundamentals: Basic Concepts and Definitions" webinar,
[http://www.verticalsysadmin.com/git/](http://www.verticalsysadmin.com/git/)
(you have to register) lays the groundwork you need to start studying Git.

If you have a team that needs Git training, email me and we can deliver a
instance of this webinar (complete with Q&A session) free of charge (as an
introductory service).

2\. For someone just starting out, I also recommend "Learn Enough Git to be
Dangerous", [https://www.learnenough.com/git-
tutorial](https://www.learnenough.com/git-tutorial) (HTML version available
for free), from @mhartl, author of the popular RailsTutorial.org

3\. The "Pro Git" book is great. [https://git-scm.com/book/en/v2](https://git-
scm.com/book/en/v2) A comprehensive resource.

------
noufalibrahim
I don't know if this post was intended as humour or a way to vent out some
frustration but in my experience, this path of treating git as "spell X solves
problem Y" will always break down.

Version control systems are an important part of the programmers toolkit and
it's worth investing a little time to get the fundamentals right.

Sure git is not the friendliest of beasts but what it lacks in interface, it
more than makes up in internal consistency and trying to learn it "inside out"
is a better long term investment than having a list of ways to solve "git
problems".

~~~
ewjordan
"Not the friendliest of beasts" is putting it mildly.

Git is basically Linus in a nutshell: abrasive, unforgiving, and behaving like
an absolute asshole to any non-expert struggling user.

Sure, engineers should probably get to know its quirks and learn to work
around them because it's now ubiquitous in the field, but let's not pretend
that there's something virtuous about it. This is a piece of truly terrible
software with an even worse UX that just happened to win the PR battle against
its superior foes, because...Idunno, Linux, I guess?

~~~
brusch64
What are the superior foes in your opinion ?

I don't know any of the other distributed version control systems. The only
other version control system I have much (too much) experience with is
Subversion and it can't hold a candle against Git.

In my opinion Git is the C language of version control systems. If you are
careless it's not the tool for you. Otherwise you have a really great tool
with lots of power.

~~~
TickleSteve
Can you justify git>subversion or are you just following the sheep?

Not saying I disagree... but subversion is still king in the corporate-
engineering companies and it tends to work well in those types of setups.

Just beware of having unjustified-opinions. SVN may not be trendy... but
neither will git in a few years time.

BTW: Mercurial still beats them all.

~~~
Grue3
>subversion is still king in the corporate-engineering companies and it tends
to work well in those types of setups.

For some values of "work". We're using SVN at my new job, with a single trunk
branch. Not having the ability to commit locally, and mess around with local
branches is a pain in the ass. I found a solution though. I cloned SVN repo
using git-svn and now I can make local commits like a pro, and use my beloved
magit (Emacs git interface).

~~~
apk17
Yes, git-svn is probably _the_ reason why the mutiny didn't happen yet in some
departments. You can identify their users by having several SVN commits in as
many seconds.

(I used git in an cvs-to-svn migration, and stayed since.)

------
m_mueller
One of my SO questions could almost fit in there, somewhere before "Fuck this
noise...":

[http://stackoverflow.com/questions/28759887/git-gc-no-
space-...](http://stackoverflow.com/questions/28759887/git-gc-no-space-left-
on-device-even-though-3gb-available-and-tmp-pack-only-16m)

------
Anthony-G
From the section on using `git commit --amend`:

> This usually happens to me if I merge to master, then run tests/linters.

If this happens on more than one occasion, I’d strongly consider creating a
pre-commit hook to run tests and/or lint the changed files, e.g., I run
`checkbashisms` and `shellcheck` as a pre-commit hook when working on shell
scripts.

------
fizzbatter
I constantly wonder if there's a "better CLI UI" that can be made for git,
even if simply a wrapper around git.

Ie, if the implementation of Git is right, but only the cli commands/etc are
wrong.. what would the right UX be? What would a friendly UX look like?

Seems like something a lot of people could love - even if blasphemy to Git
purists.

------
adamkochanowicz
Great article. A couple notes

Just git reset <ref> should do. The --soft flag is implicit.

Amending and rebasing is something you should be careful with. If you've
already pushed, you'll now need to force push. If another person has put new
commits upstream, they will be wiped out irreparably. Not saying don't do it,
just that it's very risky.

Instead of deleting and recloning the repo at the end, if you're really at
that point, just doing git reset --hard origin/master should be equally as
effective with fewer steps and less time.

Pulling down the repo a second time, however, can be more useful for just
having a snapshot of the code in a second location that is totally independent
of git traffic (don't pull to it very often). Say someone force pushes
something that removes code. Your snapshot or someone else's non-pulled repo
is your only hope of getting it back.

~~~
evanelias
Just a tiny correction: git reset <ref> defaults to --mixed, not --soft. The
only difference is whether or not files are staged. Since the OP used --soft,
I believe the subsequent `git add .` is unnecessary since the files should
already be staged when --soft is used.

Regarding the case of an erroneous force push removing code, usually things
can be recovered by looking through the reflog and doing some surgery via the
lower-level plumbing commands... it's not exactly a fun process though :)

------
pmoriarty
I've heard advice from #git on freenode not to use "git commit --amend",
especially on shared repos.

I wish I still had a log of the conversation or remembered the exact problem
that led up to it, but it involved a simple amend totally screwing up my repo,
and I've avoided it since.

~~~
eosrei
The problem occurs when you amend a commit that someone else is already using.
That is rewriting the shared history. A merge commit is required to get the
branches in sync again.

Amending your commit in your own feature branch or fork isn't a problem. I
often amend commits to make a cleaner git history to ease PR/code review.

    
    
        git checkout master
        git checkout -b 10-new-feature
        # Make changes
        git add example.code
        git commit
        git push origin 10-new-feature
        # Oops... left a debug message, fix it.
        git add example.code
        git commit --amend
        git push -f # Rewrites the remote history with your local modified version
    

Consider --amend as the "Just the last commit" form of rebasing.

------
fizzbatter
I've been debating starting a section of my personal site for stuff like this.
Unfortunately it's a bit embarrassing, but i figure anything i have to google
to learn, it would be beneficial to help others learn it as well. Everything
from programming languages (lots of Rust errors are foreign to me, for
example), to git issues.

I've often had the thought that if everyone did this it could have potential
to be quite the open-sourced collection of material - a distributed self-
answered Stack Overflow perhaps.

Is there any sanity in this? Or would posting everything as self-answers to
Stackoverflow be more welcome to the average Googler? _(higher ranking, better
meta, more likely for the user to see it and community features such as
commenting /voting/editing)_

~~~
steveklabnik
Please file bugs for bad errors in Rust. We have an entire tag dedicated to
them, and have been doing a lot of work to make them better. A non-
understandable error is a bug.

------
chriscool
I just uploaded a presentation I gave last February called "Git back on your
feet":

[http://www.slideshare.net/ChristianCouder/git-back-
onyourfee...](http://www.slideshare.net/ChristianCouder/git-back-
onyourfeet-65866467)

------
dahart
Great idea! We need more basic git workflows described in plain English.

I was expecting some actual "bad" situations based on the title, and to be
fair these were bad to me once and are bad for people new to git, but I'd love
to see the level 2,3,etc. version of this article.

~~~
falsedan
Here's my standard recommendations:

* Learn Git Branching (gentle introduction to git's UI, with a visualization of the DAG) [0]

* Git for ages 4 and up (beginner-oriented, teaches you how to model git's internal concepts, 90m video) [1]

* Git from the bottom-up (high-level overview of git's internal data structures) [2]

* My Git Habits (sophisticated, you will have to study the man pages used to completely internalize the workflow) [3]

[0]:
[http://pcottle.github.io/learnGitBranching/](http://pcottle.github.io/learnGitBranching/)

[1]: [https://youtu.be/1ffBJ4sVUb4](https://youtu.be/1ffBJ4sVUb4)

[2]:
[http://ftp.newartisans.com/pub/git.from.bottom.up.pdf](http://ftp.newartisans.com/pub/git.from.bottom.up.pdf)

[3]: [http://blog.plover.com/prog/git-
habits.html](http://blog.plover.com/prog/git-habits.html)

------
csbubbles
You know, a few years back I had exactly the same attitude towards Git. I
hated it, tried to approach multiple times and still hated it. But after
working with Git on multiple projects, and having developed some deeper
understanding of how things work there, I honestly think now that Git is one
of the best tools that have been invented over last 20 years for improving the
development processes and engineering excellence. I don't really want to
defend it, the learning curve is apparently pretty steep (at least it was for
me), but I would just recommend to not give up and keep trying. There are some
good tutorials how to handle it and why it's helpful (Atlassian's Git book,
for instance).

------
oskob
Oh shit, I commited a binary file larger than 100 mb and now i can't push to
github.com. Solution: [https://rtyley.github.io/bfg-repo-
cleaner/](https://rtyley.github.io/bfg-repo-cleaner/)

~~~
amelius
Is there some tool that runs a full internal consistency check on a git repo?

Because otherwise, how can I be sure that some tool didn't mess up my repo,
and one day I'll be getting error messages when checking out files, etcetera?

~~~
chungy
git fsck

~~~
majewsky
This. Also, hold on to the commit before you started refactoring (preferably
by placing a temporary branch there, in order to avoid premature garbage
collection). Then after your refactoring is done, `git fsck` and `git diff
--stat $old_branch..HEAD` to verify that you did not lose any important
content during the refactoring.

~~~
jerf
That is true in general. However, in the context of bfg-repo-cleaner, that
doesn't help, because the purpose of the bfg-repo-cleaner is to completely
remove commits that match the criteria you give it. I say this not to
"correct" you per se, because you are correct, but to ensure that people using
bfg-repo-cleaner do not believe that this will help them.

The "correct" course of action prior to using the bfg-repo-cleaner is to make
a complete copy of the target .git directory. I've used it many times and it
seems quite reliable, but if nothing else, that's a good defense against
terminating it halfway through accidentally or something. (Of course even
without that, you shouldn't be operating on the only copy of your .git repo
anyhow since it is almost certainly somewhere else, too, or you wouldn't be
having the problem bfg-repo-cleaner is designed to solve in the first place.
But losing your own local branches and work is still a pain.)

------
hobarrera

        git add .
    

Ugh, no, never do this, never recommend to users to BLINDLY ADD ALL THE
CHANGES FROM THE WORKING COPY. I honestly can't think of any worse git usage
than this.

Add the single change you missed, or even better, `git add -p`, to add chunks
manually.

------
random567
The screwed up and committed to master should end with:

    
    
         git reset --hard origin/master
    

(assuming that the remote is called "origin") With the example in the text,
you have to know the number of commits you've made to master.

~~~
NickHolt
It was also a bit pointless to checkout a new branch just to switch back. The
whole thing should be

    
    
        git branch some-new-branch-name
        git reset --hard origin/master
        git checkout some-new-branch-name

~~~
NickHolt
The "committed to wrong branch" case is also a little overly complex. I'd just
do:

    
    
        git checkout correct-branch
        git cherry-pick wrong-branch
        git checkout wrong-branch
        git reset --hard HEAD~

~~~
Dru89
This is less safe than the branching alternatives. Instead of "moving" the
original commit, this copies the original commit to a new one and leaves the
original one dangling and waiting to be garbage collected.

Also, if you have more than one commit before you noticed you were on the
wrong branch, this only grabs the one commit.

------
MattyRad
> Bizarrely, git won't do a dif of files that have been add-ed to your staging
> area without this flag

Not sure what's bizarre about that. Doing so helps keep your commits clean and
helps git tools (diff, git-gutter, etc) by ignoring things you've already
stated are complete.

For example, I quickly fix a bug. The code is ugly and I don't want to commit
it yet. So I add the bugfix files. Then I clean up the code (before
commiting). Now I can do another diff between the staged and unstaged files,
checking that it looks better than before, and still works. This way there is
1 clean commit "bugix" and not 2 commits "bugfix" and "bugfix code cleanup"

------
felixschl
I managed to "rm -rf .git" at one point. Took me about a minute to realize and
-surprisingly after <c-c>-ing i lost nothing (as far as i was aware). Git is
freaking hard to break. Also always remember git-reflog, it safes lives.

~~~
CardenB
What do you mean by <c-c>-ing?

~~~
felixschl
Control C to cancel

------
psyklic
Also great for getting out of Git messes:
[http://justinhileman.info/article/git-
pretty/](http://justinhileman.info/article/git-pretty/)

------
uhtred
I prefer stackoverflow for things like this as I can see from comments and up
votes whether the command does what the poster claims, or whether it is going
to make things worse for me.

~~~
coldpie
Spend a few hours and really learn how Git works! Then you'll understand what
those commands actually do and be able to judge for yourself. Great resources
are the ProGit book, gittutorial(7) and eventually gitcore-tutorial(7) when
you want to go deeper.

------
0xmohit
Nobody likes to read manuals or books, due to which one can see FAQs being
posted on Q&A sites.

[http://gitready.com/](http://gitready.com/) contains a number of small
articles categorized by beginner, intermediate and advanced that might be
helpful.

Another resource for commonly used git tips and tricks:
[https://github.com/git-tips/tips](https://github.com/git-tips/tips)

------
hacksonx
I moved to git at the begining of this year and I must say that I miss SVN.
But everyone keeps telling me that git is better so I'm sticking to it.

------
partycoder
Well, there are many more situations you can get into.

Like cherry picking, force pushing, merge --no-commit, rebasing... almost any
operation can end up going wrong.

Just pay attention.

~~~
Kesty
But he has the final solution to any git problem:

    
    
      cd ..
      sudo rm -r fucking-git-repo-dir
      git clone https://some.github.url/fucking-git-repo-dir.git

~~~
partycoder
He needs to create a hook that deletes the repo the next time they do anything
with the repo.

------
OJFord

        # create a new branch from the current state of master
        git checkout -b some-new-branch-name
        # remove the commit from the master branch
        git checkout master
    

Or just `git branch some-new-branch-name`...

    
    
        cd ..
        sudo rmdir nsfw-git-repo-dir
    

That will only remove it if it's empty? Which it never will be, because
there's at least `.git/*`...

Still, amusing :)

------
bwghughes
Fucking love it.

alias gitshit="open [http://ohshitgit.com/"](http://ohshitgit.com/")

------
abarrak
It's probably a good time to check if you have some safety against `rm -fr `.

Two days ago, I wanted to delete .git only, but accidentally as my fingers
were accustomed with -fr , the command was `rm -fr * .git`. Rails server was
running and some hope arose at the moment to just `lsof | grep` ..
unfortunately that didn't work with me !

Ironically, all dot files have stuck as obvious :)

~~~
0xmohit
> Ironically, all dot files have stuck as obvious :)

Those wouldn't have if you had set the following:

    
    
      shopt -s dotglob

------
throw2016
git to me is a work of art. There is a lot of complexity underneath but the
end user sees something that is simple, fast and easy to use. It scales
depending on user needs and It's easy to reason about.

This is a feat of engineering, to take something complex and make it easy for
anyone to undestand and use. It shows real expertise and deep understanding of
the area.

In many ways it's a shining example against the 'culture of complexity' that
we increasingly find ourselves in. Here rather than simplying the objective is
to be to make thing as complex as possible, usually in pursuit of extremely
niche use cases or because either the expertise or the interest to simplify is
not there. If git was designed in this culture it would be fragile, full of
buzz words, poorly documented and prone to failure, and something only a few
self appointed experts could reason about and use properly.

------
pc86
> _This usually happens to me if I merge to master, then run tests /linters...
> and FML, I didn't put a space after the equals sign._

Am I the only one that runs my tests before committing, let alone merging to
master?

~~~
SteveNuts
Yeah, pushing untested code to master is not such a great way to work. Push to
a remote branch other than master, test it there, then merge it into master.

That's pretty much git 101

~~~
pc86
Or test locally? I work in government contracting so everything is .Net and
TFS, but even in this environment it's trivial to make sure your code isn't
objectively broken:

    
    
      1. Click "Run all tests"
    

On your local machine even thousands of tests only takes a few seconds
including the build process. We've got automated testing in the dev and test
environments as well but if you're failing those there's a failure in workflow
somewhere. There's very little reason to fail a test or to have a broken build
in source control.

------
jakelazaroff
> Oh shit, I committed and immediately realized I need to make one small
> change!

If you don't want to change the commit message, in addition to --amend:

    
    
      git commit --amend --no-edit

------
iatanasov
The post is missing the most important command : git --help

------
sytelus
It would be nice to add these two:

Oh shit, someone checked-in huge file that shouldn't be in repo.

Oh shit, this folder I had been working on should have been in its own repo.

------
init0
for the rest of it there is [http://git.io/git-tips](http://git.io/git-tips)

------
Gonzih
why do you run git add . before git stash?

~~~
shime
`git stash` will not add new files to the stash by default, so adding them
first makes sure it does

~~~
Gonzih
But `git stash --include-untracked` will

------
cyphar
The last rmdir example should be rm -rf.

~~~
guessmyname
Maybe he has an alias named "rmdir" that executes "rm -rf"

------
swah
I fear Git so much that I make zip packages of the repo before potentially
destroying operations.

------
alistproducer2
One of my favorite teachers in school was a dude-bro programmer who pretty
sure as younger than me. He'd spent a summer at Google and made us use git and
gerrit. I'm honestly a much better programmer thanks to him. I'm still using
the git cli to this day.

I also still say "new up" an object thanks to him. I'm not so proud of that
one.

------
kuahyeow
Most of the time, stay calm. Do not `git push` hastily, and check `git status`
if you can :)

------
lordnacho
Surprised he finds git to be complicated. It probably is deep down, but for
day-to-day use, compare it to SVN.

Until I switched, there was always a panic when branching or merging. With
git, I can branch like a nutter and things seem to still work out in the end.

Not sure why, perhaps someone else has a perspective on it.

~~~
nicky0
In my experience it's all fine and dandy until you hit a rebase or merge that
needs manual attention.

~~~
apk17
In mine, not quite. All forms of merges are simple: resolve, add, commit.
Inside a rebase I find it harder to memorize whether I need to to the add
and/or commit or rebase --continue does it for me.

And conflicts from 'stash pop' are somewhat counterintuitive to handle.

------
EdiX
All of those things and more are way easier to do with gitk and git gui.

------
jimktrains2
If the owner is here: with javascript disabled the code is unreadable.

~~~
Waterluvian
I'm curious, what would you say the % of sites you visit is where they're
still useful without JS?

~~~
majewsky
That question is not very useful the way it's written down. Some sites
legimitately require JS (everything in the "web apps" territory; just try to
imagine Grafana without JS), so I would ignore these (which I hope is in line
with your intentions).

Of the sites that are mostly static content, I would estimate around 60%.
There's a small chunk of sites that are just blank with JS disabled, and
there's a larger chunk that will load images only when JS is enabled.

~~~
Waterluvian
Yeah that was a poorly worded question, sorry. I'm interested in how far one
can get without JavaScript on today's Internet. But it sounds like you don't
disable it fully, just only on untrusted sites?

60% is better than I'd expect for sites you expect to work without JS. =)

~~~
majewsky
I use uMatrix and enable first-party JS by default. That allows me to get by
on most sites. Sometimes I have to enable additional domains, mostly:

\- ajax.googleapis.com and the like

\- somethingsomething.cloudfront.com

\- variations of the same domain (for example, hn.algolia.com queries
algolia.net and algolianet.com)

By the way, it's a very valid question whether my model is actually more
secure than just uBlock, but I like it on an emotional level because I feel in
control.

------
samoa4
maybe also useful
[https://gitlab.com/esr/reposurgeon](https://gitlab.com/esr/reposurgeon)

------
nicky0
The last one is my usual tactic.

------
shklnrj
It is not the fault of Git if to use it you have to know it!

However would appreciate a quick and dirty handbook.

------
cyberferret
LOL. Bookmarking along with my other Git reference sites...

------
vacri
Not quite in the spirit of this article, but "I just want this /one/ file
without the rest of the changes from branch foo" is something I use all the
time

    
    
        git checkout otherbranch
        git checkout firstbranch -- fileIwant maybe1more
        git commit -m "brought over files"

------
oneloop
Git is complex and nuanced, and short term purple think it's faster to
memorize some commands instead of understanding the fundamentals.

I kept having problems with git, so I read a fucking book on it [https://git-
scm.com/book/en/v2](https://git-scm.com/book/en/v2)

I'm not saying I never get into situations I can't get myself out of, but the
examples in the oh shit website now look like obviously trivialities.

~~~
crdoconnor
It's easier to figure out the various workflows you need (most teams need very
few - work on feature, sync code, commit/push/issue PR, release) and then
scripting them.

I noticed that git errors on my team were almost eliminated when we started
doing that - especially once I started adding sanity checks to the git
workflows. It also allowed members of the team who previously struggled with
git to contribute much more effectively - they'd be rebasing without even
necessarily knowing what rebasing was, for instance.

It also meant that the git workflow, if it was version controlled, could also
be amended.

This worked out much better than the git course people were sent on.

~~~
oneloop
> It's easier to figure out the various workflows you need

Fine, that might be cheaper than properly training your employees. Of course,
if your employees aren't training themselves out of genuine interest that's
really the only option.

But then once something goes wrong you'll have to resort to "oh shit" websites
and hope that you can the exact issue that you're having, since you really
don't understand what's going on anyway.

> This worked out much better than the git course people were sent on.

I submit this must be because people came out of the course without really
understanding the tool. Why they didn't understand I won't speculate, but I
submit that they didn't.

EDIT: I think that which one is more appropriate depends on where it's used. I
a big structured company I can believe that yours is better, or even crucial.
But on a scenario where I'm starting a company with two other guys on a
garage, I wouldn't want the guys to be the type of people who can only use a
workflow that someone designed for them and never had the interest to dig
under.

~~~
crdoconnor
I tended to find that a few things were likely to go wrong and simply changing
the git workflow scripts to account for those things was enough.

If things went wrong, people could come to me. That often resulted in me
fixing their problem and fixing the script to ensure that kind of problem
didn't happen again - after which people stopped coming to me because they
didn't have problems.

Basically it was like releasing software.

>I submit this must be because people came out of the course without really
understanding the tool.

I submit that not everybody needs to be an expert in the tool. Non-programmers
can actually help a lot with writing stuff that needs to be version controlled
with code - e.g. writing test scripts, updating translations, various
configurations, etc.

------
Zelmor
Is the documentation really that bad? Would it benefit from a technical writer
going over it? Is the project open for discussion on changes to the
documentation?

~~~
ubernostrum
Git is like Perl. And not in any of the good ways.

Perl 5 -- I don't know enough about 6 to know whether this is still the case
-- involved a couple of design decisions which worked well for one subset of
people and did whatever the complete polar opposite of "works" is for a
different subset of people.

One of those design decisions is the famous "there's more than one way to do
it". Ask five Perl programmers to solve a simple problem in the language and
you'll get fourteen solutions, and no way of knowing which, if any, is to be
preferred in real-world use. Git similarly tends to have multiple ways of
achieving a given goal, and endless words have been devoted to documenting
them; nobody has yet settled which of them is or should be generally
recommended, or if there even can be such things as generally-recommended ways
to use git.

Perl also involves an incredible amount of memorization. The large collection
of "magic" variables which can be read or set to determine language and local-
scope behavior are daunting and can't be mastered through any process other
than rote memorization. And the differing behavior of basic operations
depending on context produces a combinatorial explosion of possibilities
which, again, are not amenable to any technique short of rote memorization.
The same is true in git: though there are underlying abstractions, the
interface provided to them is inconsistent, varies depending on sometimes-
invisible contextual factors, and ends up requiring rote memorization of
commands and options and how they behave in any given situation.

Unfortunately, no amount of documentation or review by technical writers can
fix this. A bad API can't be made good through better documentation, it can
only be made good through being replaced with a better API.

~~~
atemerev
I am a long-time Perl user and also a long-time Git user.

Git is worse than Perl. Perl is just opinionated: despite what you are saying
about it is true, you can write working programs and have fun at all levels of
Perl mastery. There's a lot to memorize, but you can start coding immediately
and do something useful. Also, Perl community is incredibly friendly and
helpful.

Not so with Git. If you start without thorough understanding how Git internals
work, you will get burned really soon. And more often than not, the only
response you'll get is the arrogant RTFM or the link to Pro Git book.

------
Annatar
Yep, git sucks but it's all the rage now. Mercurial is 100x nicer to use and
logical, but since it's written in Python it's slow as molasses, especially
with large binary files.

Next on the list: Larry McVoy's Bitkeeper promises to be everything git and
Mercurial aren't. (git is "inspired" (read: copycat) by Bitkeeper).

It's funny how _Sun Microsystems_ influenced the industry in so many ways,
isn't it?

~~~
bhrgunatha
For anyone who wasn't aware, it's also open source these days -
[http://www.bitkeeper.org/](http://www.bitkeeper.org/)

