github

作者: oleryu | 来源:发表于2017-01-11 09:53 被阅读0次

GITHUB仓库:https://github.com/oleryu/plugins.git

方法与步骤
1. 注册账号、建立一个仓库.
2. 配置本的SSH KEY
生成KEY的命令如下:
$ cd ~/.ssh
$ ssh-keygen -t rsa -C "emailaddress"
如图 github ssh-keygen
在 ~/.ssh 目录下生成两个文件 id_rsa.pub 和 id_rsa,id_rsa.pub 内容需要配置到github.com。

3. 增加ssh key 到github中
如图 github SSH keys
(1、如果你有多台电脑同步代码,建议将title填写为地名,尽量不要使用中文)(2、key框中,请查看home文件夹中的.ssh/.._rsa.pub 将文件里面的文本全部复制到Key框中即可;

4. 同步
$ git clone git@github.com:oleryu/plugins(注:此处的oleryu为你自己的账号名,plugins为你在github中创建的仓库名称)
git clone

5. 上传
$ git add sys


$git commit -m "test"
*** Please tell me who you are.
Run
        git config --global user.email "you@example.com"
        git config --global user.name "Your Name"
        to set your account's default identity.
        Omit --global to set the identity only in this repository.   
        fatal: empty ident name (for <(null)>) not allowed 


$git config user.name "mr.yhl@163.com"
$git config user.email "mr.yhl@163.com"
$ git commit -m "test"
[master (root-commit) 4e1bfe0] test
1 file changed, 7 insertions(+)
create mode 100755 sys/test/60_test-metric.sh


$git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add
and then push using the remote name
git push


$git remote add plugins https://github.com/oleryu/plugins.git


$git push -u plugins
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream plugins master


$git push -u plugins master
Username for 'https://github.com': mr.yhl@163.com
Password for 'https://mr.yhl@163.com@github.com':
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 544 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To https://github.com/oleryu/plugins.git
* [new branch]      master -> master
Branch master set up to track remote branch master from plugins.

git clone git@github.com:oleryu/plugins(注:此处的oleryu为你自己的账号名,plugins为你在github中创建的仓库名称)

git remote add plugins git@https://github.com/oleryu/plugins.git

相关文章

  • GitHub--加入GitHub

    上一篇我们讲述了GitHub的基本概念,下面我们来讲述如何创建GitHub用户。推荐阅读:GitHub--初识Gi...

  • GitHub--初识GitHub

    说老实话,我目前还是个GitHub菜鸟,哈哈!还处于从GitHub上面Clone代码的阶段。当初,只是不断听别人说...

  • Github Visualization / Github 数据

    [TOC] Github Visualization / Github 数据可视化 网站链接: https://s...

  • GitHub之初识GitHub

    GitBub是什么,我就不阐述了,那么,我开始吧。 1 创建账户 首先,打开GitHub,出现如下所示: 右侧上角...

  • Github平台 加入Github

    那么多的不说,我继续更新。 为了更好的使用Github,第一步去了解这个平台是重要的。 因此这篇我将针对Githu...

  • 【GitHub】我的GitHub

    应大家要求,已将前期一些代码传至GitHub。用户名:ququcai,地址:https://github.com/...

  • 【GitHub】GitHub的使用

    基本指令 配置自己的身份:git config -- global user.name "Tony"设置自己的名字...

  • [ github ] github clone private

    当前前提: 1: 拥有github登陆账号2: mac电脑 本文所述: 1: 创建一个新的私有工程2: 配置ssh...

  • github - github注册(一)

    前言 github面向开源及私有软件项目的 托管 平台github是 分布式 的 版本控制 系统微软收购githu...

  • Github

    1.在命令行中,输入“git init”,使Test文件夹加入git管理;2.输入“git add .”(不要漏了...

网友评论

      本文标题:github

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