Contents |
You may not like to work directly with svn and prefer git. There is a way to have bi-directional communication with our svn repository using git.
You need git-svn in an current version for that. I strongly encourage you to use git and git-svn 1.5.3.4 or newer. Older git-svn work in an incompatible way and will not give you a satisfactorily working-experience.
First of all make sure you read the git tutorial Git Tutorial. If you have done, read that introduction. For more information read the man page of git-svn and git-rebase.
Clone the repository (With version 1.5.2.4)
git-svn clone https://svn.libelektra.org/svn/elektra/trunk
Version 1.4.4.4-2 needs:
mkdir elektra cd elektra git-svn init https://svn.libelektra.org/svn/elektra/trunk
save revisions from svn-version 941 (begin of unstable) on:
git-svn fetch -r941
checkout:
git-svn fetch git checkout -b work remotes/git-svn git repack -d
To ignore executables and objects you don't have to use Exclude, .gitignore is now used.
To build the source and run the tests you should use Pre-Commit.
This assures that you won't make a disturbing commit where you can't build the source or introduced a new bug recogniced by the testing framework.
Just copy this content to
.git/hooks/pre-commit
and make it executable
chmod +x .git/hooks/pre-commit
So I really encourage you to use both files.
With version 1.5.2.4 it goes as simple as:
git-svn rebase
Version 1.4.4.4-2 needs:
git-svn fetch git rebase
Usally you just work like in any other git repository.
git-add .
adds files you wrote,
git-commit -a
tracks all your changes locally, once you want to publish it you can do it with
git-svn dcommit
In current versions of git-svn it is much relaxed how to work with branches. The only thing you must follow: Don't merge, pull or push branches
This is because git-svn always need an linear history. To fuse branches you are allowed to use
git-rebase
To send patches between developers use git-format-patch and git-am.
You can use other branches as desired, rebase them as required.