git切换分支


查看版本号:

git --version

列出项目的所有标签,通常用于表示版本号

git tag

只查看本地分支:

git branch

只查看远程分支:

git branch -r

查看本地和远程分支:

git branch -a

切换分支到abc:

git checkout abc

Git2.23及以上版本:

git switch abc

如果你还没有创建abc分支,但想基于当前分支创建一个并立即切换到它:

git checkout -b abc

查看某些文件已修改但没有提交:

git status

git切换分支查看版本号:git --versio - 图1