Source Code Control

Git Tips

 * Managing distributed GIT repo Advocacy
 * Capistrano
 * Webistrano

git filter-branch --tree-filter 'rm -rf directory/directory/directory/file' HEAD git commit -m "permanently removed this file" git push --force
 * Permanently delete files from repo
 * run in the root of the repository (BE CAREFUL)
 * Migrating a subdirectory from one repo to another permanently

Clone from gitmaster, Push to gitslave (For admins only)
Based on "this stackoverflow":http://stackoverflow.com/questions/5181845/git-push-existing-repo-to-a-new-and-different-remote-repo-server

guiyu@acer:~/gitslave$ git clone gitmaster:huangshuo Cloning into huangshuo... warning: You appear to have cloned an empty repository. guiyu@acer:~/gitslave$ cd huangshuo

guiyu@acer:~/gitslave/huangshuo$ git config -l color.ui=auto user.name=Kuiyu CHANG user.email=kuiyu.chang@mosuma.com alias.st=status core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=gitmaster:huangshuo branch.master.remote=origin branch.master.merge=refs/heads/master

guiyu@acer:~/gitslave/huangshuo$ git remote rename origin upstream

guiyu@acer:~/gitslave/huangshuo$ git remote add origin gitslave:huangshuo

guiyu@acer:~/gitslave/huangshuo$ git config -l color.ui=auto user.name=Kuiyu CHANG user.email=kuiyu.chang@mosuma.com alias.st=status core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.upstream.url=gitmaster:huangshuo remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/* branch.master.remote=upstream branch.master.merge=refs/heads/master remote.origin.url=gitslave:huangshuo remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* guiyu@acer:~/gitslave/huangshuo$ git pull upstream master && git push origin master
 * 1) do some stuff git add; git commit -a

Git Advocacy

 * git-scm.com
 * Pro GIT book
 * GIT blog
 * Basic intro to git
 * configuring GIT, GITOSIS, GITWEB
 * How GitHub tamed the open source world

GIT sub-modules

 * Submodules from Git Community Book

GIT vs hg

 * Google's analysis
 * It's all in the branch! (Rebuttal of the above)

GIT vs SVN

 * Why you should Switch from SVN to GIT
 * GIT vs SVN technical details
 * GIT for SVN users, crash course
 * another official crash course
 * Migrating from svn to GIT]

Gitolite

 * install gitolite
 * Gitolite
 * ACL with GIT
 * After setting up hooks, e.g., modifying /var/lib/gitolite/.gitolite/hooks/common/post-receive, you **must** run as gitolite gl-setup, otherwise the hooks won't be run

Installation guides

 * migrating svn to git
 * gitolite with apache ACL
 * GITWEB with LDAP ACL
 * Smart HTTP support in GIT
 * git gitolite git-daemon

Git and Binary files like OpenOffice Docs

 * 
 * git-annex