I committed and pushed changes to the Master branch in GIT today using Eclipse. In our team it is a strict "No".
While I know I have to be careful while pushing any changes to the Master and double check which branch I am working in. I was wondering if there is a way to check the branch and throw a warning if one is working in the master and trying to commit.
Is there a way to set a preference or throw an error message.
Thank you!
Edit:
The question was marked duplicate to a previously asked question: Prevent commits in a local branch
Is there a way to do achieve this pre-commit hook using Eclipse Git-Staging view.
Thanks!