• Linux系统github使用


    命令行下使用:

    1.检查ssh key

    cd ~/.ssh

    如果提示"No such file or directory",则需要创建一个ssh key.

    2.创建ssh key.

    ssh-keygen -t rsa -C "your_email@example.com"

    会有相应提示,按照提示操作:

    # Creates a new ssh key, using the provided email as a label
    # Generating public/private rsa key pair.
    # Enter file in which to save the key (/home/you/.ssh/id_rsa):

    Enter passphrase (empty for no passphrase): [Type a passphrase]
    # Enter same passphrase again: [Type passphrase again]

    Your identification has been saved in /home/you/.ssh/id_rsa.
    # Your public key has been saved in /home/you/.ssh/id_rsa.pub.
    # The key fingerprint is:
    # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com


    3.将ssh key 设置到github上,install copy tool :
    sudo apt-get install xclip

    工具装好后,将ssh key 拷贝到剪切板上

    xclip -sel clip < ~/.ssh/id_rsa.pub

    或者通过其他方式,正确的copy到github上进行设置.

    4.将文件提交到本地git 仓库

    git add .
    
    git commit -m "version1.0"

    如果已经有项目,则需要clone

    git clone git@github.com:git_name/project_name.git

    5.同步本地仓库到远程,为远程仓库创建别名

    remote add project_name git@github.com:git_name/project_name.git

    同步

    git push -u project_name master
    查看当前branch
    git branch

     

    The ending....
  • 相关阅读:
    [CLYZ2017]day8
    [CLYZ2017]day12
    [bzoj1503][NOI2004]郁闷的出纳员
    [CLYZ2017]day18
    [CLYZ2017]day11
    [CLYZ2017]day17
    在DLL中获取服务器路径
    SPSecurity.RunWithElevatedPrivileges 拒绝访问
    prototype1.4.0(转载)
    删除多表数据
  • 原文地址:https://www.cnblogs.com/xiangtao/p/3154556.html
Copyright © 2020-2023  润新知