首页 > 程序 > github使用

作者:ghostry 发布时间:2012-12-19 浏览: 11993

转载注明出处: https://blog.ghostry.cn/program/github-shi-yong.html

首先你要有一个账号.去github.com注册.
然后创建一个库,
这些我都不讲,我要讲的是怎么传东西进去.
系统是ubuntu.我已经装好了git.安装我也不讲.
下面开始

mkdir ghostry
cd ghostry
git init
git config --global user.name "Your Name Here"
git config --global user.email "your_email@youremail.com"
echo 'test'>readme
git add .
git commit -m 'first commit'
git remote add origin https://github.com/username/Hello-World.git
git push origin master

根据提示输入github的用户名和密码.这样就上传了.
可能我们喜欢不那么频繁的输入密码.
我们可以使用cache

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

这里我写了一个月的时间,这样我在相当长的时间里都不用输入密码了.
当然,你也可以用ssh-keygen的方法来解决.这个官网有介绍.
如果想用图形界面,可以用git-gui.安装后用git gui打开.还有个gitg也不错,不过好像不能push.

标签: git

上一篇: 说啥好呢.
下一篇: 人人网牛逼

已有 6 条评论 »

  1. 没用过,也没精力用

  2. Github太高端了而且我也不是码农所以不知道能用来干嘛的...

    1. 恩.这东西就是码农专用.话说你还在折腾主题啊.

      1. 是啊...因为都不知道干啥好所以就折腾主题玩了...

  3. 貌似不是一般的复杂,拉到。。。还是用一般的网盘简单

    1. 这个本来就不是网盘..

添加新评论 »

*
*

欢迎评论!歡迎評論!Comments welcome!komentoj bonvenaj!댓글 오신 것을 환영합니다!
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: :cold: :cryy: :cute: :shy: :sleep: :struggle: :tea: :yahou: