News for hackers. Stuff that matters.
Re:Ask HN: What are your favourite programming shortcuts by joehx2 on Friday March 29, 2024 @06:20PM (#39869618)
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 -
Re:Ask HN: What are your favourite programming shortcuts by yen223 on Friday March 29, 2024 @06:25PM (#39869659)
For those who may not know, `cd -` brings you to the previous directory.
Re:Ask HN: What are your favourite programming shortcuts by sethammons on Monday April 01, 2024 @05:07AM (#39892070)
Unfamiliar with 'switch'; i do 'git checkout -' all the time to toggle back and forth