Open jennie-jd opened 6 months ago
Here is good read https://ioflood.com/blog/git-switch-vs-checkout-pros-and-cons/
Git Switch and Git Checkout are both used for switching between different branches in a repository. However, Git Checkout is a versatile command also capable of discarding changes and creating new branches, while Git Switch is a newer, more specialized command focused solely on switching and creating branches.
It sound like using old git version < 2.27.0.
Check git version
git --version
Here is good read https://ioflood.com/blog/git-switch-vs-checkout-pros-and-cons/
Git Switch and Git Checkout are both used for switching between different branches in a repository. However, Git Checkout is a versatile command also capable of discarding changes and creating new branches, while Git Switch is a newer, more specialized command focused solely on switching and creating branches.
It sound like using old git version < 2.27.0.
Check git version
git --version
Thanks, very helpful materials. That being said, I submitted a PR with some added information about git checkout
, but the repo owner does not seem to be active in reviewing the PRs, so I am still waiting for his review.
Here is good read https://ioflood.com/blog/git-switch-vs-checkout-pros-and-cons/
Git Switch and Git Checkout are both used for switching between different branches in a repository. However, Git Checkout is a versatile command also capable of discarding changes and creating new branches, while Git Switch is a newer, more specialized command focused solely on switching and creating branches.
It sound like using old git version < 2.27.0. Check git version
git --version
Thanks, very helpful materials. That being said, I submitted a PR with some added information about
git checkout
, but the repo owner does not seem to be active in reviewing the PRs, so I am still waiting for his review.
There is only one maintainer so it may take while to be merged. Mine also pending there.
check out your github version
🐞 Problem
My machine gave me an error that "git: 'switch' is not a git command. See 'git --help'".
🎯 Goal
After reading the git help menu, I discovered that
git branch
+git checkout
is an alternative way of creating a new branch and switching to it, so adding these instructions will help people like me.💡 Possible solutions
Add additional instructions:
If the following does not work:
git switch -c your-new-branch-name
Consider using
git branch
and thengit checkout
:git branch your-new-branch-name
git checkout your-new-branch-name
Or, a combined instruction:
git checkout -b your-new-branch-name
📋 Steps to solve the problem
Addresses #<put issue number here>