Unmerged topic branches sorted by last commit date
edit: Use script below for an up-to-date list of unmerged branches.
Unmerged personal branches sorted by last commit date
edit: Use script below for an up-to-date list of unmerged branches.
edit: Use script below for an up-to-date list of unmerged branches.
edit: Use script below for an up-to-date list of unmerged branches.
Extracted from the huge list above.
Extracted from the huge list above. Last committer added.
I'm creating a more detailed list of unmerged remote branches in CSV format with the following script:
#!/usr/bin/env bash FILTER="origin/*" FILE="output.csv" echo "Branch,Commits,Last commit date,Last committer,Files changed,Insertions,Deletions" > "$FILE" iterations=$(git branch --all --list "$FILTER" --no-merged | wc -l) i=1 git branch --all --list "$FILTER" --no-merged | while read -r branch ; do branch=${branch#"remotes/"} shortstat=$(git diff --shortstat "HEAD...$branch") files_changed=0 insertions=0 deletions=0 if [[ $shortstat =~ ([0-9]+)\ files\ changed ]]; then files_changed=${BASH_REMATCH[1]} fi if [[ $shortstat =~ ([0-9]+)\ insertions ]]; then insertions=${BASH_REMATCH[1]} fi if [[ $shortstat =~ ([0-9]+)\ deletions ]]; then deletions=${BASH_REMATCH[1]} fi commits=$(git rev-list --count "$branch" ^origin/master) last_commit_date=$(git show --date=short --format="%cd" "$branch" | head -n 1) last_committer=$(git show --format="%cn" "$branch" | head -n 1) line="$branch,$commits,$last_commit_date,$last_committer,$files_changed,$insertions,$deletions" echo "($i/$iterations) $line" ((i++)) echo "$line" >> "$FILE" done
Hi there! 🙂
This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑
Best wishes,
The MITK devs