git_report 1.2 KB

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. git fetch upstream
  3. git --no-pager log --decorate --graph upstream/master..
  4. echo -e "\n\n--------------------------------------------------------------------------------"
  5. # Read .rebase-ignore and build exclude_args array
  6. exclude_args=()
  7. if [[ -f .rebase-ignore ]]; then
  8. while IFS= read -r line || [[ -n "$line" ]]; do
  9. # Trim leading/trailing whitespace from the line
  10. line_trimmed=$(echo "$line" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  11. # Skip empty lines or lines starting with # (comments)
  12. if [[ -n "$line_trimmed" && ! "$line_trimmed" =~ ^\s*# ]]; then
  13. exclude_args+=(":(exclude)$line_trimmed")
  14. fi
  15. done <.rebase-ignore
  16. fi
  17. echo git --no-pager diff upstream/master $(git stash create --include-untracked) --name-only
  18. git --no-pager diff upstream/master $(git stash create --include-untracked) --name-only
  19. echo -e "\n\n--------------------------------------------------------------------------------"
  20. echo git --no-pager diff upstream/master $(git stash create --include-untracked) "${exclude_args[@]}"
  21. git --no-pager diff upstream/master $(git stash create --include-untracked) "${exclude_args[@]}"
  22. echo -e "\n\n--------------------------------------------------------------------------------"
  23. echo DATE: $(date "+%Y-%m-%d %H:%M:%S")