3 ms·
At 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 guide
by capableweb 7y ago
At 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