zoukankan      html  css  js  c++  java
  • ubuntu下git安装及连接github

    1.安装

    sudo apt-get install git git-core git-gui git-doc git-svn git-cvs gitweb gitk git-email git-daemon-run git-el git-arch

    2.在github上注册账号及建立ropository

    3.测试连接github

    ssh -T git@github.com

    现在是ssh连不上的

    4.生成本地ssh密钥

    ssh-keygen -t rsa -C "your email@xxxx.com"

    5.在github上设置公钥

    在GitHub中,依次点击Account settings -> SSH Keys -> Add SSH Key,将id_rsa.pub文件中的字符串复制进去

    此时再用第3步的命令应该可以连接到github了

    6.git初始化设置

    $ git config --global user.name "Your github Name"
    $ git config --global user.email  you@email.address
    

    进入项目目录

    git init
    

    将项目中文档存至Git仓库中,并且变成Git仓库能够识别的数据格式。  

    $ git add .
    
    # 提交
    $ git commit -m "你的版本更新信息"
    
    #将项目更新到github repository上
    $ git push
    

      

  • 相关阅读:
    Jquery 复习练习(01)
    web前段 弹出小例子
    MacBook 显示隐藏文件夹命令
    sqlserver 纵横
    C#获取当前页面的url
    C# Json 转对象
    jquery导航栏
    AJAX
    hao dongxi
    微信网页获取openId
  • 原文地址:https://www.cnblogs.com/zeng-wei/p/3636900.html
Copyright © 2011-2022 走看看