Make the git rebase strategy work with releases

This pull requests makes you able to create releases with the git-rebase strategy.

It also refactors some common code.

Note: to use releases with the git-rebase strategy, the repository parameter is required.