本地代码上传到github

首先需要在电脑上安装git;然后到github.com注册自己的账号,然后创建一个仓库Repository

在git bash中输入命令 git config user.name 和 git config user.email 可是自己当前登录的是哪个账号。

登入自己的github账号:git config --global user.name '';git config --global user.email '';

重点:

git remote add origin https://github.com/****/*** (你自己的仓库地址),一般会让你输入账号和密码。

这是将本地的代码上传上去,如果是从远程拉取代码那就是使用git clone命令。

posted @ 2018-12-28 16:28  双木君  Views(208)  Comments(0Edit  收藏  举报