代码推送到github,并配置密匙

来源:互联网 发布:软件外包保密协议 编辑:程序博客网 时间:2024/05/29 18:11

代码推送到github,并配置密匙

配置ssh key

$ cd ~/.ssh #是否有密匙,有的话清空

$ cd ~  #保证当前路径在”~”下

$ ssh-keygen -t rsa -C "xxxxxx@yy.com"  #填写有效的邮箱


推送

  1.  初始化本地仓库
      git init

  2.  git add .
     表明添加所有文件至版本控制

  3. 提交
    git commit -m 'your commit'

  4. 在github上创建远程仓库并添加到远程仓库
    git remote add master git@github.com

  5. 推送分支到远程仓库
    git push master master 【git push origin master】


0 0
原创粉丝点击