GIT sucks
I do not like git.
Let’s take the most mind-numbingly trivial of operations, I want to put a branch I have somewhere so somebody else can get it. That’s the whole point of distributed revision-control, collaboration.
That’s too fundamental to be covered in the git tutorial, after all, it wouldn’t be fun if it were that easy.
Happily, git has built in manual pages. And knowing a few other revision control systems, we can guess that the command might be push. And indeed, there’s a push command:
push Update remote refs along with associated objects
Maybe this isn’t going to be so hard after all, a quick git push –help and we’ll be laughing.
DESCRIPTION
Updates remote refs using local refs, while sending objects necessary
to complete the given refs.
Ok, err, not quite sure what that means; but it sounds like it’s doing something over there with what I have here. Probably the tool I want.
You can make interesting things happen to a repository every time you
push into it, by setting up hooks there. See documentation for git-
receive-pack(1).
I’m not sure I want to know about making interesting things happen right now, I’ll just settle for some boring making-things-public.
OPTIONS
<repository>
The “remote” repository that is destination of a push operation.
See the section GIT URLS below.
Aha! Now we’re getting somewhere. I give it an argument saying where I want to push to, that all makes perfect sense. A quick skip down to the URLs bit tells me I can use ssh, which is what I want.
There’s one other mandatory argument though.
<refspec>…
The canonical format of a <refspec> parameter is +?<src>:<dst>;
that is, an optional plus +, followed by the source ref, followed
by a colon :, followed by the destination ref.
Err?
*blink*
Whuuuuh?
My brain seems to have fallen out of my head, let me pop it back in and read that paragraph again.
<refspec>…
The canonical format of a <refspec> parameter is +?<src>:<dst>;
that is, an optional plus +, followed by the source ref, followed
by a colon :, followed by the destination ref.
It didn’t get any better the second time.
Some faffing around, guess-work and cargo culting what other people do seems to suggest it wants the branch name there. Well, why didn’t it say so?
Ok, that should be easy then.
quest util-linux% git push ssh://kernel.ubuntu.com/srv/kernel.ubuntu.com/git/scott/util-linux.git ubuntu fatal: '/srv/kernel.ubuntu.com/git/scott/util-linux.git': unable to chdir or not a git archive fatal: The remote end hung up unexpectedly
I’ve had a few ex-boyfriends hang up on me before, and they were gits too.
There’s nothing in the manual page about this.
There’s nothing in the tutorial.
What the holy crap is going on?
Turns out, you need to create the other side first. Why the buggering bollocks can it not to that for you?
So, let’s try that. There’s some clues about this in the git init manual page, but I have to be honest and I begged for help (and mercy) at this point:
quest util-linux% ssh zinc zinc scott% cd /srv/kernel.ubuntu.com/git/scott zinc scott% GIT_DIR=util-linux.git git init Initialized empty Git repository in /srv/kernel.ubuntu.com/git/scott/util-linux.git/ zinc scott% exit quest util-linux% git remote add zinc ssh://kernel.ubuntu.com/srv/kernel.ubuntu.com/git/scott quest util-linux% git push zinc ubuntu Counting objects: 10652, done. Compressing objects: 100% (2545/2545), done. Writing objects: 100% (10652/10652), 19.10 MiB | 12192 KiB/s, done. Total 10652 (delta 8075), reused 10534 (delta 8013) To ssh://kernel.ubuntu.com/srv/kernel.ubuntu.com/git/scott/util-linux.git * [new branch] ubuntu -> ubuntu
Hurrah! At last!
No.
Not at all.
Firstly, pushing to a remote branch doesn’t make it visible in anything like gitweb. You have to do enable that.
quest util-linux% ssh zinc zinc scott% cd /srv/kernel.ubuntu.com/git/scott/util-linux.git zinc util-linux.git% chmod +x hooks/post-update zinc util-linux.git% git update-server-info zinc util-linux.git% exit
Ok, now does it work?
No.
Looks all ok, but if somebody tries and checks that out:
wing-commander scott% git clone git://kernel.ubuntu.com/git/scott/util-linux.git Initialized empty Git repository in /home/scott/util-linux/.git/ warning: remote HEAD refers to nonexistent ref, unable to checkout.
What the hell?
How can a push command succeed while leaving an utterly useless branch?
Don’t bother trying to find this one in the manuals:
quest util-linux% ssh zinc zinc scott% cd /srv/kernel.ubuntu.com/git/scott/util-linux.git zinc util-linux.git% rm HEAD zinc util-linux.git% ln -s refs/heads/ubuntu HEAD zinc util-linux.git% exit
Now it works.
In all that is holy, what, the, fuck.
Seriously?
My quote of the day:
“Git is hard to use if you are not used to its workflow.”
No.
Git is hard to use.
Here’s what I wanted to do:
quest util-linux% revision-control-system push ssh://host/path/somewhere
If it takes anything more than that, it’s fucked.






@lol (earlier comment):
No, YOU suck.
- Anonymous comment: -∞ for relevance
- “xxx sucks” w/o details on why: -∞ for commenter maturity and intelligence
- needlessly stomping on someone just because you disagree with them: -∞ for commenter maturity and intelligence
…
So… can you do better? Build something better than git or svn or bzr or LSMFT, build a community and an ecosystem/infrastructure around your new creation and make the world see how much better it is?
Didn’t think so.
Eff off. And grow up. Not necessarily in that order.
Completely agree, it sucks! Much too complicated to use
I agree. Git makes it way to hard to do simple things. I’ve used SVN, CVS, Perforce, Mercurial, VSS. None make it as difficult as git. I always thought version control was supposed to be brainless, not an exercise in frustration.
Trying to use Git is like being on LOST. If you want to see ultimate half-baked suckage, try installing and using git on a Windows server and client. I was forced to give up and went with Subversion, a much more mature product with better integration with mainstream development environments, OS’s and IDEs, and semi-usable documentation.
@RoryR =>
Git was designed to take advantage of the way POSIX filesystem layers operate, particularly in Linux. It’s tuned to be *rediculously fast* on these systems. As a side-effect, performance sucks in Windows. The msysgit guys have done an amazing job just getting it to work semi-decently in Windows.
If you want something to work quickly in Windows, use Bazaar or Mercurial. They’re orders of magnitude slower on POSIX systems, but they’re more portable. That’s the tradeoff you have to choose.
@Paul: Fast for local operations, but still damn slow for that initial download. Every version control system is (or is that just DVCS? Haven’t done a SVN checkout in a while.)
Ironically, a tarball is the best option for the initial checkout.
Many seem to be in love with GIT (not here
)…
I, on the other hand, keep banging my head against the wall. Before someone says I must be an idiot – I’ve figured out more software with my eyes closed and hands tied behind my back, than you have… and whether this GIT has something great or not, it’s RETARDED! I’ve been using version control for 12 years – not only for software, but for CAD files as well… GIT doesn’t make sense to a newbie and quite frankly the docs aren’t cutting it.
Since there are projects I’m after that are using GIT, I’m GOING to learn it, but good gravey – WHY would anone love it? I don’t know… yet.
Tools like TortioseGIT or something else that removes Learning the BS – well then there’s a tool worth getting behind. PLEASE more people help out with the project and get it FULLY GOING!
Or could GIT just Git Itself Theeffouttahere!?
@Chris, you’re absolutely right. Other DVCS tools (Mercurial, Bazaar) seem to be more intuitive and robust while having less of a superiority complex. I’m starting to lump git in with emacs and perl: they’re the tools that put the ‘über’ in ‘übergeek’, but for those of us who just want to get things done in the easiest, most teachable and supportable manner practical, they’re completely counterproductive.
I don’t expect git to go away, any more than emacs has; neither has to be commercially successful, or even grow outside a tiny, self-congratulatory echo chamber of geekery where self-referential obscurity is seen as a primary virtue. As time goes on and the folks who actually WANT to get things done find the sharp edges, the differences between hype and reality, they’ll move on, leaving the echo chamber isolated and intact — which is what’s wanted, anyway.
Very poetic and insightful, nice!
you’re right on.
I’ve use lots of version control tools too.
Git has wasted hours of my time in the course of a week.
And it’s STILL not doing what I want.
Back to SVN for me.
Scott, are you gay? I am serious.
Scott, I was not trying to be rude, it’s just I thought you were funny when you wrote “my ex-boyfriends were gits too”. I thought at first perhaps you meant “girlfriends”. So, don’t take it the wrong way. I am not being sarcastic or mean. In fact I like the humour in your post.
GIT is totally fucktarded software…it tries to bend user into its illogic workflows, does not follow any estabilished CLI principle and creates all sort of weird statuses and operations. I have found impossible to mantain a kernel git clone with a few patches because it automagically screws up itself, and no way it won’t pull without merging, and it won’t merge without commit, total nonsense!
And, furthermore, the bastards at kernel.org don’t allow you to remotely export the GIT trees – because they want you to use their lovely software. Fuck that.
Oh boy. I cannot agree with you more. You are absolutely correct. It is complete shit.
Our organisation just moved from svn to git and it’s been an unmitigated disaster! We *need* submodules, and submodules in git is all the pain of git multiplied by a thousand.
I just want to say thank you.
I just spent my entire morning and several hours over the last few days trying to figure out how to use GIT to track changes and push updates in my single server/single user environment. After deciding the solution was too ridiculously convoluted and would actually take more time than my previous workflow, I typed “git sucks” into Google and this was the first result.
I wonder if any of these circle-jerking basement-dwelling GIT fanatics have actually been in an environment where “time is money” and getting shit done is more important than changing the way things are done (even when it makes things worse).
1-Our company introduced git/gerit on Feb 2010 as ’source control’.
2-Since then every developer productivity decreased more than 60%.
3-Our git experts spend theirs entire wd dealing with the shit.
4-I have more than 20 y experience in programming, and I have not seen anything worst than.
5- If a programing/handling tool takes more then 10% of the total development time is a damn worst tool.
6-Mouse was invented almost 40 years ago.
Sigh.
“refs” is git’s name for a branch name. Push sends a local “branch name” to a remote “branch name” and sends all the data necessary for that branch to work. there. simple. exactly what you want.
dhbanes:
on your server you can ssh to, type git init –bare repo.git
on your client, type git clone server:path/to/repo.git
now put all your stuff in the new ‘repo’ directory
git add
git commit
git push to send stuff to the server
if someone puts stuff on the server, git pull to get stuff.
Git sucks. I know you said that, but I wanted to re-say it. Here’s a little conversation I had with git the other day (not verbatim):
Me:
Me:
Me: "Oh that looks funny. But, hmmm, it doesn't look like an error in my code. Maybe it's an error in someone elses code and I can fix it with an update.
Me: git pull
Git: No, you changed something before I'll even look to see if the changes can be merged you've got to commit it.
Me: Well I'm not really comfortable with that, my code might have an error.
Git: You must commit
Me: -sigh- git commit
Git: I got some new code and merged some stuff.
Me: Run. Well that was no help. I'll roll back my changes and see if an earlier version works.
Git: Hah! How about a hash key sucker.
Me: A hash key? Really that's the best way to approach this? You couldn't have a mature GUI, or maybe an simi-readable naming system?
Git: Hash key now puny human.
Me: Fine what are my keys?
Git:
Me: git reset
Git: Now your files are exactly as they were, but one isn't committed anymore.
Me: Of course, because that was really the simplest way to approach flagging one file as "not committed". I don't suppose we could actually hide that file somehow.
Git: I have a complicated n-layer deep stash we could put it in to. Everyone on the web advises you never bother with the indexing this supports because who really wants to stash a dozen things then retrieve the 7th layer?
Me: git stash savethis
Git: I put it in position 0. Of course, your files haven't changed because I did a merge after the change you just uncommitted and then stashed and I consider that the head.
Me: Yes you do you little darling. git reset --hard
Git: Fine, whatever, but it will all end in blood. I think we know that by now don't we?
So, yes, git sucks.
@David,
This is an amazing script you wrote and yes GIT S U C K S for sure. I don’t like it and that’s it. I don’t need someone’s opinion to change my thoughts. I truly agree with the author that GIT sucks.
@Chris,
Lots of people especially in open source community loves lots of bullshit products but that doesn’t mean everyone should use it.
Rails community is adapting lots of useless stuff which is relevant to their mind boggling complex systems but that’s not a case with every language. Take PHP as an example. Simple, short and sweet