Manage commits that are only in remote branches

This patch makes possible to deliver from a repository that does not use local branches, like Jenkins workspaces with its git plugin.

If no local branch is found for the given commit, then it will pick the first remote branch it will find, push to the remote, and clone to a delivered repo branch accordingly.