Hacker News new | ask | show | jobs
by dgritsko 330 days ago
FWIW, this is what I wound up with - keeps the original branch name but ensures that it's based on the latest from the "dev" branch:

orig_branch=$(git branch --show-current) && git checkout dev && git pull && git branch -D "$orig_branch" && git checkout -b "$orig_branch"