github使用

1、安装git客户端

查看是否安装成功

git --version

2、拥有一个git账号

帐号:526835657@qq.com  密码liurong@123

3、git命令

提交某个分支

git status 查看状态

git add .

git  commit -m "XX "

git push

3、查看本地分支

git  branch

4、查看远端分支

git branch -a

5、创建本地分支

git checkout -b branch1

6、提交本地分支到远端

git push --set-upstream origin branch1

7、删除远程分支

git branch -r -d origin branch1

git push origin :branch1

8、合并分支

git merge branch1,在当前分支上合并branch1分支

9、回退到上一个版本

git reset --hard HEAD^

10、查看历史版本

git reflog   git reset --hard 版本号

原文地址:https://www.cnblogs.com/liurongwp/p/12018210.html