Using Git with Logging
This page reflects some knowledge from: http://wiki.apache.org/general/GitAtApache with logging specifics.
Setting up your log4j environment
git clone git://git.apache.org/log4j.git cd log4j/.git wget http://git.apache.org/authors.txt cd .. git config svn.authorsfile ".git/authors.txt" # check if your username and email are identical to those in the author file git config user.name git config user.email # if they are not identical, set the ASF values locally # git config user.name <Your Name> # git config user.email <Your Email> git svn init --prefix=origin/ --tags=tags --trunk=trunk --branches=branches https://svn.apache.org/repos/asf/logging/log4j git svn rebase
After this, you'll need to fetch the old history.
git svn fetch --log-window-size 10000
Commits can happen with:
git svn dcommit
This will commit all your git commits to svn - one git commit == 1 svn revision. Consider rebase.
Working with SVN branches
You need git svn fetch (see above) to make this work.
Create a new local branch and switch to it in GIT:
git checkout -b log4j12modules-svn origin/log4j12modules
Map the GIT branch to the according SVN branch:
git reset --hard origin/log4j12modules
For reference, you can override the committ url:
git svn dcommit --commit-url https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12modules
Working with remote branches from Github
You can add a remote branch from github like this:
git remote add stubbs https://github.com/astubbs/log4j.git
Pull changes with:
git pull stubbs modulriseify
When merge conflicts happen, these can be resolved using:
git mergetool