4 ms·
This is slowly improving, at least; `git switch` is now a thing, for example. https://git-scm.com/docs/git-switch/2.23.0 https://git-scm.com/docs/git-switch/2.2
by Smaug123 7y ago
This is slowly improving, at least; `git switch` is now a thing, for example. https://git-scm.com/docs/git-switch/2.23.0 https://git-scm.com/docs/git-switch/2.23.0
- capableweb 7y agoAt a glance, it seems to do the same as `git checkout` and `git checkout -b`. Can someone give a TLDR about the difference? Edit: gonna be fun to see how guides like https://www.atlassian.com/git/tutorials/using-branches/git-checkout https://www.atlassian.com/git/tutorials/using-branches/git-c... are becoming outdated in a way where switching/checking out doesn't mean the same thing anymore, but the article uses them interchangeably
- masklinn 7y agoThese three invocations are not present in switch: git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>… git checkout [<tree-ish>] [--] <pathspec>… git checkout (-p|--patch) [<tree-ish>] [--] [<paths>… ] That is, aside to / on top of the ability to switch to a specific branch or commit, checkout * is used to revert working tree changes, possibly interactively * is used to set working tree changes to either side of a merge (in case of conflict) * is used to revert specific local paths to a historical version thereof, possibly interactively