初始化用户名 git config-global user.name 'itcast'
设置用户名邮箱 git config-global user.name '@qq.com'
查看设置: git config -list
下载仓库: git clone 仓库地址
查看状态: git status
创建文件: touch test1.php
添加到暂存区: git add test1.php
提交到仓库: git commit -m '提交描述'
调教到远程仓库 git push
Git 全局设置:
git config --global user.name "不高兴"
git config --global user.email "398805653@qq.com"
创建 git 仓库:
mkdir unhappy //创建文件夹
cd unhappy //打开至文件夹目录
git init //git 初始化
touch README.md //创建readme.md文件
git add README.md file_1 file_2 file_3 // 添加至缓冲区 (多个文件)/(文件夹)
git commit -m "first commit" //添加描述
git remote add origin https://gitee.com/githubtext/unhappy.git // git远程添加源
git push -u origin master //添加到远程仓库
第二次上传文件
判断有没有git远程添加源
有 =》git push
一般从git下载的仓库存在添加源
无 =》git remote add origin https://gitee.com/githubtext/unhappy.git // git远程添加源
git push -u origin master //添加到远程仓库