1.概念:
repository(仓库):一个项目一个仓库
star(收藏)
fork(复制)
pull request(发起改进请求)
watch(关注):项目有更新,你会收到通知
issue(提出bug问题)
2.git的工作区域:
工作区:添加、编辑、修改文件等动作
暂存区:暂存已经修改的文件最后统一提交到git仓库
git repository:最终确定的文件保存到仓库
3.基本命令:
git status#查看状态
git add#从工作区提交到暂存区
git commit -m“提交描述”#从暂存区提交到git repository
git config --global user.name'名称'
git config --global user.email'xxx@qq.com'
git init#初始化文件夹(先进入该文件夹)
git clone git地址#复制远程项目到本地
git push#同步本地项目到远程
若没有权限,需要在.git/config里将
url=https://github.com/用户名/仓库名.git
改为
url=https://github.com/用户名:密码@github.com/用户名/仓库名.git