I kept finding myself running the same repetitive Git commands each time I merged a pull request: switching to main, pulling changes, and deleting the branch. It got tedious, so I decided to automate it. I wrote a small shell script that handles it all for me: gist.github.com/domhhv/be466...
Post
This script: - Switches to `main` by default (or any branch you prefer). - Pulls the latest changes with rebase. - Deletes the old branch. - Optionally stashes and pops local changes if needed (just add --stash). Hopefully, it helps your productivity as well if you've faced the same problem!
0 reposts0 likes
No replies yet.