git下拉不同分支的方法

**

下拉master分支

git clone  地址

下拉指定分支

git clone 地址  --branch 分支名

指定分支提交

先切换到该分支,然后执行git add和git commit

如果本地没有远程分支,需新建相同分支

 git branch 分支名
 git branch -f 分支名     (强行创建分支)

切换分支

 git checkout 分支名

查看分支

 git branch

历史提交信息查看

git log --pretty online
git log --stat
git log

版本后退

git reset --head   版本的id编号

历史提交信息

猜你喜欢

转载自blog.csdn.net/weixin_43922901/article/details/88813501