[SVN] Re: r11308 (ActionScript 3)
Gerd Knops
gerti-textmate at bitart.com
Sun Feb 15 17:17:10 UTC 2009
On Feb 15, 2009, at 10:35 AM, Simon Gregory wrote:
> Apologies for the duplicated commits/spam.
>
> I've decided to try git out and it appears that I don't fully
> understand git-svn. If anyone has any tips for keeping in sync with a
> svn repository please let me know.
Thats what I do for work, and I like git a lot. I am relatively new at
this, but I give it a stab:
After the initial 'git-svn clone' the workflow is roughly this:
- Make local changes
- When it is time to commit:
git-svn rebase # get your repository in sync with remote, then apply
your changes on top
git-svn dcommit # submit your changes to the remote repository
Note that this will send all your local commits one by one. To avoid
that, you can use topic branches and when you merge them back to
master, 'squash' the commits into one. That works roughly like that:
git checkout -b my_branch # create a new topic branch
Make changes, commit, make more changes, commit... When it is time to
send it to the remote repository, I'd use this workflow (probably not
the most elegant, but it is what I know):
git checkout master # switch to master
git-svn rebase # get remote changes and apply to master
git checkout my_branch # get back to your topic branch
git rebase master # rebase to be in sync with master, may need
conflict resolution
git checkout master # back to master branch
git merge --squash my_branch # merge changes from 'my_branch', the '--
squash' combines all the commits from the branch into a single commit
and let's you edit the commit message
git branch -d my_branch # delete your topic branch (sometimes you
need -D instead of -d)
git-svn dcommit # Submit the changes to the remote repository
Gerd
More information about the textmate-dev
mailing list