DEV Community

Discussion on: The difference between cd - vs cd ~-

Collapse
 
aligeorgie profile image
Ali

so can you use either cd or git checkout and they will both enable you to move into the desired branch?

Collapse
 
vinistock profile image
Vinicius Stock

Using cd - will change to the previous directory and git checkout - or git switch - will change to the previous branch.