I generally use Subclipse, but there's some wonkiness in my code right now and I want to do some sanity checks from the command line. Thanks to Subclipse, I can usually see the branches I'm using in Eclipse's Package Explorer window.
What command can I use from the command line to see the branch I'm currently using?
Resources I tried before Stack Overflow include the SVN book, this list of commands and this other list of commands. I didn't find anything that would let me passively look at branch information (as opposed to making some sort of active branch modification, which is not what I want).
and tags, and then just "ls". You can run "svn list -h" for more info on list.
Try the following:
svn info
This will give you the URL your workspace is a checkout of, relative to where you are in the workspace. You should be able to see the branch in the URL.
With some regex, you can get just the branch name:
svn info | grep '^URL:' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With