Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# SVN vs Git performance and ease of use
# --------------------
# the git version
function error_mkdir() {
echo "Please give me a base directory to work in. For example: /tmp/stress_test"
exit 1
function error_is_not_working_dir() {
echo "$1 is not a directory."
exit 1
function error_cleanup() {
echo "Please clean up tmp directories under ${working_dir}."
exit 1
if [ ! $1 ]; then
if [ ! -d ${working_dir} ]; then
mkdir ${working_dir}
cd ${working_dir}
# create the git repo (no server needed)
git init .
# download linux kernel source (79M, ~42,000 files)
if [ ! -f /tmp/linux-3.6.1.tar.bz2 ]; then
wget -O /tmp/linux-3.6.1.tar.bz2 \
tar xjf /tmp/linux-3.6.1.tar.bz2
git status
git add linux-3.6.1
git commit -m "initial commit" -a
git checkout -b "ipod_support"
echo -e "Linux kernel release 3.x <>\n" > linux-3.6.1/README
echo -e "NOW WITH IPOD SUPPORT" >> linux-3.6.1/README
# git status
# On branch ipod_support
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# modified: linux-3.6.1/README
# no changes added to commit (use "git add" and/or "git commit -a")
git commit -m "hacked on ipod support" linux-3.6.1/README
git checkout master
git merge ipod_support
git branch -d ipod_support
# second branching, no comments below for brevity
git checkout -b more_hackery
echo "it was all you" > linux-3.6.1/CREDITS
git commit -m "updated credits" -a
git checkout master
git merge more_hackery
git branch -d more_hackery
# third branch
git checkout -b last_diddy
echo "free as in freedom" > linux-3.6.1/COPYING
git commit -m "updated license" linux-3.6.1/COPYING
git checkout master
git merge last_diddy
git branch -d last_diddy
# cd
# rm -rf ~/tmp/git_stress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment