Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #----------------------------------------------------------
- # 檢查是否合併了 Enhancement,建立備份分支
- #----------------------------------------------------------
- # * Author: 羊小咩 Lamb-Mei
- # * Update : 2014/12/20
- # * Description: 當合併了 Enhancement ,顯示警告跟建立備份用分支
- #
- echo $GIT_REFLOG_ACTION | grep -q "merge Enhancement" >> /dev/null;
- if [ $? == 0 ]; then
- #已經合併了不想要的分支
- echo "Error 合併包含 Enhancement !!"
- echo "請立即使用 reset 或 revert 解決此錯誤 !!"
- #複製原始的狀態
- git branch AP_ISSUE_HEAD_bak HEAD^1
- git branch AP_ISSUE_Master_bak master^1
- else
- echo "check OK 合併檢查無誤!!!"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement