amarao: (Default)
[personal profile] amarao
Пушить нельзя, а коммитить локально можно. В очередной раз промахнувшись бранчем и вынужденный делать git branch -D master, я набрался attention span и сделал прекоммит хук, чтобы такое запретить: .git/hooks/pre-commit:

#!/bin/sh
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "master" ]; then
echo "Direct commits to master branch are not allowed."
exit 1
fi
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

amarao: (Default)
amarao

April 2026

S M T W T F S
   1234
567 891011
12131415161718
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 14th, 2026 04:02 am
Powered by Dreamwidth Studios