美文网首页
windows下Git使用教程

windows下Git使用教程

作者: 码农老齐 | 来源:发表于2016-11-09 15:03 被阅读0次

安装

  • 下载git客户端,git客户端
  • 安装,默认选项就可以。

初始化设置

  • 程序中打开git命令行工具 [Git Bash Here]
  • 配置全局提交用户信息
    git config --global user.name "Firstname Lastname" git config --global user.email "your_email@youremail.com"

git使用

  • 进入项目文件夹,运行git init
  • 从远程克隆项目git clone https://git.oschina.net/qiliping/longkang-php.git(会提示用户名和密码,输入即可)
  • 添加远程分支git remote add origin https://git.oschina.net/qiliping/longkang-php.git
  • 更新远程项目文件git pull origin master
  • 添加本地文件到仓库 git add *(添加所有)
  • 提交变更 git commit -m "代码提交信息"
  • 推送变更到服务器git push origin master

相关文章

网友评论

      本文标题:windows下Git使用教程

      本文链接:https://www.haomeiwen.com/subject/wgttpttx.html