controle_de_versao:git
Diferenças
Aqui você vê as diferenças entre duas revisões dessa página.
| Próxima revisão | Revisão anterior | ||
| controle_de_versao:git [2014/07/17 13:56] – criada Édson Kuzniewski | controle_de_versao:git [2014/11/11 16:04] (atual) – [Bloquear push no master] Édson Kuzniewski | ||
|---|---|---|---|
| Linha 4: | Linha 4: | ||
| [[wppt> | [[wppt> | ||
| + | ===== Bloquear push no master ===== | ||
| + | [[https:// | ||
| + | [[http:// | ||
| + | [[http:// | ||
| + | <file sh .git/ | ||
| + | #!/bin/bash | ||
| + | |||
| + | protected_branch=' | ||
| + | current_branch=$(git symbolic-ref HEAD | sed -e ' | ||
| + | |||
| + | if [ $protected_branch = $current_branch ] | ||
| + | then | ||
| + | read -p " | ||
| + | echo | ||
| + | if echo $REPLY | grep -E ' | ||
| + | then | ||
| + | exit 0 # push will execute | ||
| + | fi | ||
| + | exit 1 # push will not execute | ||
| + | else | ||
| + | exit 0 # push will execute | ||
| + | fi | ||
| + | </ | ||
| + | < | ||
| + | chmod +x pre-push | ||
| + | </ | ||
| ===== Programa para utilizar o git localmente ===== | ===== Programa para utilizar o git localmente ===== | ||
| [[http:// | [[http:// | ||
| Linha 70: | Linha 96: | ||
| ==== Checkout ==== | ==== Checkout ==== | ||
| '' | '' | ||
| - | |||
controle_de_versao/git.1405616164.txt.gz · Última modificação: (edição externa)
