Skip to content

Instantly share code, notes, and snippets.

@huseyin
Forked from roktas/pre-commit
Created April 7, 2017 23:50
Show Gist options
  • Save huseyin/8e034cfa090538cab74a7d41b5ce1afd to your computer and use it in GitHub Desktop.
Save huseyin/8e034cfa090538cab74a7d41b5ce1afd to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Fork depolarda master dalında değişiklik yapmayı engelle.
if [ "$(git rev-parse --abbrev-ref HEAD)" = master ]; then
if git config remote.upstream.url >/dev/null; then
cat >&2 <<-EOF
Üst geliştirici depo referansı "upstream" belirlendi.
Alt geliştirici olarak çalıştığınız depolarda "master" dalında
değişiklik yapmayın. Özellik dalı açarak çalışın. Aşağıdaki
komutu kullanarak çalışmanıza bir özellik dalı üzerinde devam
edebilirsiniz:
$ git stash save && git checkout -b «özellik dalı» && git stash pop
EOF
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment