top | item 39869618

(no title)

joehx2 | 1 year ago

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 -

discuss

order

yen223|1 year ago

For those who may not know, `cd -` brings you to the previous directory.

sethammons|1 year ago

Unfamiliar with 'switch'; i do 'git checkout -' all the time to toggle back and forth