by Smaug123 · 7y ago · 0 comments
Edit: gonna be fun to see how guides like 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
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