My repo is SVN, and I do all development with git. We have a standard layout, and I initialized my local repo with git svn init -s <url to repo>
Here's my workflow for working with branches:
# creates a new branch remotely
git svn branch new-branch-name
# switches to a branch or trunk locally
git reset --hard name-of-branch
git reset --hard trunk
# merge changes from trunk into a branch
git reset —hard name-of-branch
git merge trunk
git svn dcommit
That last command above will commit the changes to the branch name-of-branch. My question is, how does git know this? When I do git reset --hard foo
, what exactly happens?
This might just come down to a general question about git. Every time I try to research an answer I get confused about if svn integration is a special case or not.