Reputation: 1063
My repository is set up in a way that when someone pushes on "branches", a CI system checks what has been pushed and then pushes back on "master". So, when someone pushes and pulls, it's on "branches". But if someone commits and push something wrong, it stays on "branches", and when someone else pulls, it drags in the bad things.
I found that I can change "git pull" and "git push" commands so that they pull/push from another branches than Master, but can I separate these two settings? How can I set my repository in a way that "git pull" = "git pull origin master" and "git push" = "git push origin branches"
Thanks in advance
Upvotes: 0
Views: 90
Reputation: 2846
I think you would be better off respecting the way Git works.
You can have your users explicitly pull from master and push to branches.
This way your history will make more sense in the long run no user will be confused by the hidden logic.
Upvotes: 1