I like to work with GIT, but company SCM is SVN. To make my GIT project work with SVN:
- initialize GIT repo
$ cd /path/to/my/repo
$ git init
- initialize SVN directory and
- it creates SVN repo inside .git path
- it assumes we are using standard (-s) SVN structure
$ svn mkdir --parents protocol:///path/to/repo/PROJECT/trunk -m "Importing git repo"
$ git svn init protocol:///path/to/repo/PROJECT -s
- pull SVN
$ git svn fetch
$ git rebase trunk
- resolve any conflicts (shouldn't be any if SVN was empty),
loop until its OK
$ git status
$ git add
$ git rebase --continue
- to commit to SVN do
$ git svn dcommit
procedure borrowed from a bit longer explanation on StackExchange
to keep .gitignore clean from mess specific to my dev environment add dev-tool specific stuff to global gitignore file:
$ git config --global core.excludesfile ~/.gitignore_global
$ echo ".idea/**" > ~/.gitignore_global
add project specific stuff to project specific exclude file .git/info/exclude this will not be checked in to repo
$ echo "localdev.config" > .git/info/exclude
$ echo "testfiles/**" > .git/info/exclude
Some stuff that will help with using GIT:
- This is the best bash prompt I've found