I would like to know if there is a way to get a warning if I try to push directly to my remote master.
Asked
Active
Viewed 157 times
0
-
Where and how do you want to get that warning? – Daniel Hilgarth Jan 14 '13 at 15:25
-
I suppose on the command line… I am basically hoping that there is a setting somewhere that I set on either my repo or git. – griotspeak Jan 14 '13 at 15:27
1 Answers
1
Git pre-push hooks is what you are looking for
You could use a client side hook or a server side hook depending on your needs.
All about hooks: http://git-scm.com/book/en/Customizing-Git-Git-Hooks

intuitivepixel
- 23,302
- 3
- 57
- 51
-
It seems that it is what I am looking for but is not official yet. http://stackoverflow.com/questions/13960839/why-doesnt-git-have-a-pre-push-hook – griotspeak Jan 14 '13 at 16:42