Advertisement
Guest User

Untitled

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