Skip to content

Instantly share code, notes, and snippets.

View emil-alexandrescu's full-sized avatar
🏠
Working from home

Emil Alexandrescu emil-alexandrescu

🏠
Working from home
  • Bucharest, Romania
View GitHub Profile
# Add the function to the .zshrc and update your console environment
function git-mass-cherry-pick {
# The exact commit from which the cherry-picking will start.
readonly start=${1:?"Starting commit SHA must be specified."}
local branch_name=$(git rev-parse --abbrev-ref HEAD);
local bak_name="bak/${branch_name}"
# Remember commits to be cherry-picked
local commits_to_cherry_pick=()
for commit in $(git log $start^1.. --no-merges --reverse --pretty=%H --abbrev-commit);