
Uses of git - sundar22in
http://devsundar.github.com/2012/02/09/Uses-of-git/
======
ap22213
Distributed version control is such a wonderful thing. And, I love how github
has become a pseudo-wiki - letting individuals change information, knowledge
and not just code. Naturally, HTML/HTTP is graph-like, but unfortunately it
has converged over time into a few homogeneous master branches, owned and
controlled by a few. I hope that techniques like DVCS with its branching,
forking, and merging of information, can create better Wikipedias.

~~~
drothlis
Have you seen Ward Cunningham's "federated wiki"?

<http://wardcunningham.github.com/>

------
mixonic
Shameless alpha-testers-wanted plug:

I'm launching a website authoring collaboration tool based around Git. Let me
know if you're a git fanatic who needs to build fairly simple sites from time
to time, and maybe you can try it out and give me some feedback!

Figured this wasn't completely off-topic, as I'm building Yet-Another-Use-For-
Git :-)

matt.beale@madhatted.com

~~~
bostonvaulter2
Does the website use Jekyll?

~~~
mixonic
Jekyll is part of what is going on, yes. But not the whole ball game by any
measure!

------
amirmc
There's also git-annex

<http://git-annex.branchable.com/>

~~~
emmelaich
Another use case for git-annex (and hence git) would be host intrusion
detection a-la aide, or tripwire. You'd have to add metadata tracking to make
it worthwhile though.

------
rplnt
The sentence about Torvalds might be a bit of a stretch. The approach
(distributed version control) wasn't new when he created git.

Also, what is with that changing of selection color? :)

~~~
sundar22in
Its true that Linus did not invent distributed version control (he did not
invent OS either), but git did change the world of version control systems
similar to his other creation Linux.

Thanks for observation, i did not notice the selection color was pink :)

------
ComputerGuru
I'm surprised no one has mentioned it before, not that it's revolutionary or
amazing, but just so damn helpful:

Turn your /etc/ into a git repository. It'll save you hours on end of
maintenance and debugging in the long run, especially when you update packages
and find that your configurations have been overwritten or lost.

~~~
gerrit
You should check out etckeeper, a package that does exactly that. Additionally
it will hook into apt-get and similar system tools and automate Some of the
revisioning

~~~
Terretta
Ubuntu's page about it:

<https://help.ubuntu.com/10.04/serverguide/C/etckeeper.html>

Example of using etckeeper with Git on Ubuntu 10.04 LTS:

[http://evilrouters.net/2011/02/18/using-etckeeper-with-
git-o...](http://evilrouters.net/2011/02/18/using-etckeeper-with-git-on-
ubuntu/)

------
gwern
> Github and Bitbucket provide a wiki backed by git. Colloboration tools such
> as wikis can be run by using git.

And Gitit: <http://gitit.net/>

~~~
sundar22in
Thanks for this suggestion. Post updated. +1

------
Keithamus
On the "git as a backup tool", the author missed a tool which looks quite
interesting, called Bup (<https://github.com/apenwarr/bup>) which is based on
git's toolchain. It is still immature but worth looking at.

~~~
sundar22in
Thanks, Your suggestion is updated in the post.

------
HerrMonnezza
IkiWiki (Perl-based) is another wiki backed by git (or svn, or bzr, or other
VCSes), and has also other nice features like static website and blog
generation.

[1]: <http://ikiwiki.info/>

~~~
sundar22in
Thanks for the link. Updated the post with your suggestion! Hope its useful
for others as well.

------
alexchamberlain
The blog states that git can be used as a database with version control. Does
anyone know of a more optimised (document-oriented) database with version
control?

If not, is there an interest for one?

~~~
throwaway191
Could you elaborate on what you mean by "document oriented db with version
control"? Couch stores revision identifiers with every document ID, though old
versions are subject to deletion whenever DB compaction occurs...

~~~
alexchamberlain
Essentially, objects have the ability to be rolled back, forward etc. Support
for messages attached to commits and transactional commits would be nice!

An extensible user collection would also be nice, so app users are database
users and vice versa.

------
jamesgeck0
How well does Git handle being used for syncing arbitrary files? I'd been led
to believe that storing large binary blobs in it was a Bad Thing (tm).

~~~
gigq
It's not ideal. It will end up storing two copies of the data files, one in
the .git folder as a blob and one for the regular file in the checkout.

There are projects (<http://git-annex.branchable.com/> and
<https://github.com/schacon/git-media>) to try and get around this issue but
then you are not really using git to manage the files directly anymore.

------
SonicSoul
excuse my ignorance.. but it is interesting to me that we see blog posts about
how to find different uses for git. what makes git so great that we (or people
writing such articles) try to retrofit it into tools that already have more
mature alternatives dedicated solely to doing that one thing really well. it's
some form of marketing i don't fully understand.

~~~
amirmc
Isn't this what 'hacking' is (at least partially) about?

Despite the existence of 'solutions', there are lots of interesting things
people can do with git and it's probably fun to explore them.

edit: I'm not sure why you consider it 'marketing' either.

~~~
SonicSoul
yep, i understand your point, and i do see the hacking angle. and i also see a
bit of zealotism. I would be very curious to learn what benefits could be
gained from hacking git to do something like a wiki (other than being able to
say that you're using git for wiki). And i'm not cynical here, genuinely
curious..

~~~
icebraining
Well, you gain a bunch of features for free, like distributed storage, signed
edits, etc. Also, I already know how to use Git, which saves me time over
having to learn a whole new set of commands to use some other wiki software.

And frankly, is it really different from using someone else's library or
module?

~~~
vectorjohn
Yeah, even already knowing git isn't necessary. If you didn't learn git, you
could learn it, and then you have the skills to use it for all sorts of stuff.

No specialized wiki software can be a DVCS or backup system.

------
enjalot
We are (ab)using git in some fun ways. Our designers use branches we setup
with git flow to develop and manage assets. We deploy from develop and master
branches to dev and production servers. We also use the github api to allow
the dynamic loading of the assets from the head of any one of the branches for
internal testing.

I've been pleasantly surprised how well the designers have taken to the
workflow, and its great to take advantage of the flexibility of git especially
when we don't have the time to roll our own backend to cover all those bases.

~~~
franklovecchio
I do the same thing for testing branches and continuous deployment on EC2! +1.

------
iambot
I've come across a project before that used GitHub's gist API as a document
store for client side apps. Can't for the life of me find it again, Don't
suppose anyone else has come across this use and can remember the url (or has
it bookmarked)

------
chunkyslink
I asked the community this question a few months back - small discussion here

<http://news.ycombinator.com/item?id=2732149>

------
human_error
There's also Blogofile, static blog generator for Python lovers.

~~~
sundar22in
Thanks for the info. I love python.

~~~
peterhajas
Hyde is another great one, I use it for my personal site.

------
___Calv_Dee___
Fantastic post on the beauty of git. The Using git for for deployment article
seems like a great micro-intro to git. Nice one!

------
franklovecchio
I use Gists as user-data files for EC2 deployments. Works amazingly well.

~~~
sundar22in
Interesting, could you please elaborate on this use of git. It will be
helpful. Thanks.

~~~
franklovecchio
Sure. I'm actually working on a bootstrap project which uses Gists and Node.js
to spin up a scaling infrastructure: <https://github.com/franklovecchio/yc-
bootstrap>. Instead of using CloudFormation, which I loathe, or Puppet/Chef
(which have a learning curve and infrastructure for latter), I use standard
bash libraries (see yc-bootstrap/gists/) and "extend" them to spin up
instances -- see the README under "Gisting":
([https://github.com/franklovecchio/yc-
bootstrap/blob/master/R...](https://github.com/franklovecchio/yc-
bootstrap/blob/master/README.markdown)). That example is what the user-data
file would be.

~~~
sundar22in
Thanks! +1

------
eiji
Allowed uses of git?

Maybe someone can shed some light on that aspect, and the webpage should too.

Every time when I see "GNU GPL" I just turn around and think it's not worth
the trouble.

~~~
scott_s
I think you have a fundamental misunderstanding of the implications of GPLed
software.

If you _incorporate_ GPLed software into your own software - that is, copy the
source code - then your work is considered a derived work and is also under
the GPL.

Software that is LGPLed can be _linked_ to without making your application
under the GPL itself. This includes things like glibc. (The "L" in "LGPL" used
to stand for "Library" but now it means "Lesser.")

Finally, if you use GPL software to produce your own works, there is no
effect. So using git to manage your own source has no impact. Same with using
gcc to compile your source.

~~~
obtu
Minor correction: the LGPL relaxes the reciprocity requirement for code that
uses the LGPL code; linking isn't the only example, imports in dynamic
languages is another.

~~~
icebraining
The GPL doesn't have a reciprocity requirement; it's a pay-it-forward system.

