Skip to content

Instantly share code, notes, and snippets.

Created July 31, 2022 13:43
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pratyushmittal/4bcc06b887ef844775f44b801893b9f6 to your computer and use it in GitHub Desktop.
I like to manually mark each line as checked during code reviews. This script allows that. Blog post about it:
just --list
#!/usr/bin/env bash
cd {{invocation_directory()}}
source_branch_name=$(git branch --show-current)
git merge main
git checkout -b $review_branch_name
git reset main
#!/usr/bin/env bash
cd {{invocation_directory()}}
review_branch_name=$(git branch --show-current)
# trim "review-" from starting for source branch name
messages=$(git log ...main --format=%B)
git checkout $source_branch_name
git checkout $review_branch_name . --no-overlay
echo $messages | git commit --file -
git branch -D $review_branch_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment