Tests for pushing up branches

Also refactoring some logic so the actual work is done within the git module