Windows使用Github

首先,你需要执行下面两条命令,作为 git 的基础配置,作用是告诉 git 你是谁,你输入的信息将出现在你创建的提交中。

git config --global user.name "你的名字或昵称"
git config --global user.email "你的邮箱"

然后在你的需要初始化版本库的文件夹中执行:

git init 
git remote add origin <你的项目地址> //注:项目地址形式为:http://git.oschina.net/xxx/xxx.git或者 git@git.oschina.net:xxx/xxx.git

进入你已经初始化好的或者克隆项目的目录,然后执行:

git pull origin master
git touch init.txt //如果已经存在更改的文件,则这一步不是必须的
git add .
git commit -m "第一次提交"
git push origin master
原文地址:https://www.cnblogs.com/LoganChen/p/6758952.html