# work for a while, decide to merge changes in from the trunk
$ svn st -q
# oops, I have local changes and I don't want to commit them yet
$ svn diff > backup-my-changes.patch
# for each changed file
$ svn revert files
# review the logs to determine the last revision I merged from trunk, and the latest revision from trunk
$ svn log -v | less
$ svn merge -r123:456 ~/svn/trunk .
$ svn commit -m "Merge -r123:456 from trunk"
$ patch -p0 < backup-my-changes.patch
$ rm backup-my-changes.patch
On the other hand, I've been getting a lot of exposure to git over the past year or so and the equivalent workflow is something along these lines:
# work for a while, decide to merge changes in from the trunk
$ git rebase master
So you see, not all source control packages are created equally. Branching is so simple and useful in git that I never knew what I was missing until I started using it. My workflow is often:
- work on experimental changes
- receive request to work on another task
- finish task, return to experimental changes
- repeat
I don't think I can convince management to let us switch to git though, since it is a more radical change and some developers might not like change. Pity, that.
1 comments:
wait...
what?
Post a Comment