Git tutorial

  • 本地创建 SSH key

$ ssh-keygen -t rsa -C "你的GitHub注册邮箱"

  • 验证是否连接成功

$ ssh -T [email protected]

  • 设置Username和Email

$ git config --global user.name "your name"
$ git config --global user.email "[email protected]"

  • 初始化目录

$ git init

  • 添加文件

$ git add .

  • 提交至本地暂存区

git commit -m "first commit"

  • 指定远程上传地址

git remote add origin https://github.com/用户名/Git仓库名称.git

  • 推送至github

git push -u origin master

你可能感兴趣的:(Git tutorial)