technology

A Git Subversion Workflow

After you’re done making changes locally…

Get changes from Subversion

git svn fetch
git svn rebase

Combine changesets using interactive rebase

git log --oneline
git rebase -i last_good_commit

This opens up your editor with a file listing all the available commits to rebase.

  • Find changesets where you started a bigger task.
  • Change pick to reword for these changesets.
  • For changesets below each of these, change pick to squash. These changesets will get folded into the previous commit.
  • Save the file to continue the process.

For each commit that you specified to reword, git will open your editor to allow you to change the commit message. Once you save and quit, you’ll get another editor that let’s you specify the commit message for all of the changes you are squashing. Thinking about it now, I can probably keep the commits that I changed to reword as pick, since this is redundant.

Push changes back to Subversion

git svn dcommit
Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s