Comment

Comment by joehx2

I've recently discovered `git switch -` and `git merge -`. It switches to the previous branch you were on or merges the previous branch you were own.

No need to know the name.

So if I need to pull updates on the previous branch I was on and merge them into my current branch, I can just:

    git switch -
    git pull
    git switch -
    git merge -
parent joehx2 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton