Git学习笔记
Git工作区和暂存区视图:

初始化:
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
初始化仓库:
$ git init常用命令:
$ git add FileName/FloderName //添加文件或目录到暂存区$ git status //查看状态$ git commit -m "备注" //将暂存区文件提交到当前分支Git与GitHub的运用:
创建SSH密钥:
$ ssh-keygen -t rsa -C "youremail@example.com" //生成id_rsa.pub文件存放公有密钥 关联GitHub仓库:
$ git remote add origin git@github.com:michaelliao/learngit.git 推送本地文件到GitHub仓库
$ git push -u origin master

浙公网安备 33010602011771号