Total Pageviews

Saturday 28 April 2012

git学习资源

http://gitready.com/
---------------------------------------------------------------------------------------
GIT is a distributed version control system created by Linus Torvalds in 2005. After linux it is one of the most influential program written by Linus and it changed the way people think about version control systems. Eventhough originally intended to be used as a source code management system, now git has widespread use other than managing the source code. Git when used with other tools solves various problems and can be used for the following purpose,
  • Database
    Git can be used as a database for your application. If you need a distributed database with versioning then git is a good choice. There are many database implementations built on top of git. Distributed peer to peer database systems are good for occasionally connected clients.
    prophet
    gimd
  • Dropbox clone
    Git can be used as a automated file syncing service. There are few dropbox clones built on top of git already.
    Dropbox clone
    sparkleshare
    dvcs autosync
  • Wiki
    Github and Bitbucket provide a wiki backed by git. Collaboration tools such as wikis can be run by using git.
    git-wiki
    ikiwiki - Perl suggested in the HN comment
    gitit suggested in the HN comment
  • Bug tracking
    Distributed bug tracking is possible with tools such as Ditz and git.
    ditz
  • Simple version control
    Git repositories are very easy to setup (Just use the command "git init" to create a repo), so it can be used as a private version control without any server. It can be used to version control your documents. You can version any folder you want, i use git to manage multiple versions of my documents. We can move around the repo just by moving the folder to some other location.
    It can be used to store org-mode TODO files, notes in a git repository and synchronize between machines (laptop, desktop etc).
    Another use of versioning the /etc folder suggested in reddit
  • Deployment
    Git can be used for deploying your application. A good example is Heroku in which each application is a git repository and you deploy the application just by pushing your changes. In the past ftp was used in similar cases For e.g deploying to a webhosting server.
    You can setup git for deployment in your own webserver as well.
    Using git for deployment
    Another use case is to use git for delivering updates to desktop applications. For e.g. If we have a python based desktop application, we can have each installation as a clone of the central repository and user has to just pull the repository (This can be provided as a menu item as well).
  • Backup tool
    Git can be used as a backup tool. If git is used with a central server we can be assured to restore the data to any past version and there is no single point of failure.
    Common problem with off-site backup is that people do not test their backup. I have seen cases where people did backups and while restoring they discovered that they could not restore their backup!
    Git does not help solve all the backup problems, but it has good use as a backup tool.
    bup suggested in the HN comment
    git as backup tool 1
    git as backup tool 2
  • Websites and Blogs
    We can run static sites, blog with git and static site generators such as jekyll or octopress. It is a hackers way to run a blog.
    Blogging like a hacker
  • Other uses
    Gittorrent: A a peer to peer protocol for synchronizing git repositories.
Conclusion: Given the variety of ways in which git can be used, I think git is for everyone and not just for developers. It is worth its learning curve. As there are many excellent git hosting services, you can store all your data in the cloud and move to another service if you dont't like them. There is no problem of vendor lockin. Happy gitting!

Hacker news discussion: http://news.ycombinator.com/item?id=3571040