1、Github
Github:https://github.com/(免费)
Coding:https://coding.net/(免费)
Gitlab:gitlab.com(免费30天)
2、GIT基础命令
拷贝项目:git clone <仓库地址>
创建分支:git branch
创建并进入分支:git checkout -b
切换分支:git checkout
查看状态:git status
添加所有文件:git add .
提交到暂存区:git commit -m '这里是当前提交的描述’
拉取:git pull
推送:git push
查看分支:git branch — list
查看分支(包含远程分支):git branch -a
合并其他分支到当前分支:git merge — no-ff ‘描述’
3、使用步骤
1、git init
2、git add .
3、git commit -m ‘注释’ 上传 – 生成历史版本
4、git status 查看
5、git remote add origin 仓库地址 复制创建仓库倒数第二行代码
6、git push -u origin master 复制倒数第一行代码
注:如果 git push -u origin master命令 报错,就输入 git push
4、创建分支上传
1、git init
2、git add .
3、git commit -m ‘注释’ — 创建历史版本
4、git remote add origin 仓库地址
5、git branch 分支 — 新建分支,分支为英文
6、git checkout 分支 – 切换到该分支
7、git checkout -b 分支 – 切换到新建分支
8、git push — 该命令报错时,输入:git push -u origin 分支 – 上传到该分支
5、第二次上传
git add .
git commit -m ‘注释’
git push
pull:拉取文件