Search code examples
gitjenkinsgithooksgit-push

Redirecting a git push


I am currently playing with hooks to get our repositories to tell Jenkins to build, etc. I have been looking for information on how I would be able to redirect a push to another repo, or even if this is possible? So for example developer pushes to Dev repo, pre-push hook or maybe pre-receive hook redirects it to Testing repo. So basically any changes wouldn't go to the Dev repo until they have passed tests keeping the Dev build from being broken

Any information or documentation would be greatly appreciated.


Solution

  • For manage your remote :

    https://help.github.com/categories/managing-remotes/

    And change your remote:

    https://help.github.com/articles/changing-a-remote-s-url/