1.git add . 是将本地仓库所有文件加入缓存区等待提交
2.git remote add origin+远程仓库地址 是在本地仓库建立一个与远程仓库的别名,以便之后提交的代码不是每次都要输入远程仓库的地址
3.建立分支:
1.首先在本地建立分支,并切换到该分支上(本地建立完分支,默认是在master分支上)
git branch +分支名
git checkout+分支名
(这两步合起来就是 git checkout -b +分支名)
2.push到远程仓库上面
git push origin +分支名
4.使用git branch查看当前本地分支,使用git branch -a 查看本地和远程分支
5.使用git status 查看git当前状态和分支
6.删除本地分支:git branch -d +分支名(删除该分支时当前不能处于该分支下,要切换到别的分支上)
7.删除远程分支:git push origin --delete +分支名
8.修改远程仓库地址
git remote -v
# 查看当前的远程仓库
git remote set-url origin https://where you want to put your repository to.git
# 修改为想要设置的远程仓库
git remote -v
#验证一下
git clone 和git pull的区别。。。不会