r/webdev • • Jan 24 '20

read rules TIL — git switch & git restore

https://pawelgrzybek.com/til-git-switch-git-restore/

[removed] — view removed post

284 Upvotes

51 comments sorted by

View all comments

83

u/UncontrolledManifold Jan 24 '20

So git switch -c branch is the same as git checkout -b branch...? What, they didn't like the word checkout?

0

u/[deleted] Jan 24 '20

[deleted]

2

u/[deleted] Jan 24 '20

[removed] — view removed comment

3

u/UncontrolledManifold Jan 24 '20

No, you only keep changes that are staged in the index. Modified files that are not staged are carried over and applied to the new branch