Shorthand commands for SVN

  •  

SVN can be quite cumbersome to use. I just prefer using GIT, because of, erm… reasons. Sometimes however, you have to work with SVN because of collaborations or older projects just started that way. Therefore I've created some very simple shorthands, bash aliases to be precise, to speed things up a bit (and avoid typing the same stuff over and over again).

These aliases can be easily added to your bash_aliases file in one go:

echo "alias svndiff='svn diff | colordiff | less -r'" >> ~/.bash_aliases
echo "alias svnremove='svn status | grep ! | cut -c9- | while IFS= read -r FILE; do svn remove \"\$FILE\"; done;'" >> ~/.bash_aliases
echo "alias svnadd='svn status | grep ? | cut -c9- | while IFS= read -r FILE; do svn add \"\$FILE\"; done'" >> ~/.bash_aliases
. ~/.bashrc

Now you can use:

  • svndiff to show your working changes in a readable format (you might have to apt install colordiff to get this going);
  • svnremove to remove files that no longer exist from version control;
  • svnadd to add new files to version control.

Just type one of these commands whilst in your SVN directory and you're good to go.

PS: U using Wind00z and using SVN? U broken beyond repair…