作为一名程序员,分享自己的经验,项目,代码是大家习以为常的一件事,但是有的时候有人跟喜欢下载别人的代码,真正体会到别人的意图。今天我将如何使用github上传自己的代码分享给大家。

1.首先我们要进入github官网注册github账号。

2.上传的详细步骤可参考https://help.github.com/

我们在mac系统下,以上传一个REDME为例,打开终端,输入命令如下:

git config --global user.name "yuzw"

git config --global  user.email "yuzw@witmob.com"

git config --global credential.helper osxkeychain

我们create a repo

image

image

mkdir hello

cd hello

git init

touch REDME

git add REDME

git commit -m "first commit"

git remote add origin https://github.com/yuzwwitmob/hello.git

git push origin master

这样就可以将我们的代码上传到github上

Logo

免费领 200 小时云算力,进群参与显卡、AI PC 幸运抽奖

更多推荐