git简单使用

https://github.com/HePeng11/GitPractice

1.git init 初始化一个库

2.git add . 添加文件到库管理

3.git status 查看状态

4.git commit -m "描述信息" 提交到本地库

5.git rm xxx.txt 删除文件

6.git log 查看日志版本


7.git remote add origin https://github.com/HePeng11/GitPractice.git 添加远程仓库地址

8.git push -u origin master 推送到远程仓库

9. git remote add origin git@IP:relativeDir.git,添加完成后会在本地.git/config文件中看到添加的url,也可以修改这个url
git pull origin master 拉取远程代码

10 git branch 查看分支

11 git branch testBranch1 创建分支

12 git checkout testBrach1 切换到分支

13 git merge testBranch1 主分支合并xxx分支

原文地址:https://www.cnblogs.com/hepeng/p/9791336.html