David Reynolds

Welcome to boredom

Git Workflow

| Comments

I’ve been using this for a while and had it recorded on a private on a private wiki. I was just tidying up my hosting account and thought I’d get rid of the wiki and store any useful info from it on my blog

Clone full subversion history into git repository (warning, may take a long time depending on how many commits you have in your Subversion repository).

1
$ git-svn clone -s http://example.com/my_subversion_repo local_dir

-s signifies trunk/ branches/ tags/ exist in the svn repo (standard repository setup)

Create branch for local changes and check it out

1
$ git checkout -b XXXX-description # where XXXX is a ticket number

Make my changes in the branch… Make my commits in the branch…

Change back to master branch

1
$ git checkout master

Merge branch as one commit to master

1
$ git merge --squash XXXX-description

Commit changes to master branch:

1
$ git commit -a

Push changes back to svn:

1
$ git svn dcommit

Resync local_changes to master:

1
2
$ git checkout XXXX-description
$ git rebase master

Comments