Mac下github的使用

  1. 新建github账户

  2.  

    新建Repository,如下图:

    Mac下github的使用
  3.  

    建立连接github的秘钥

    打开mac的shell

    cd ~

    mkdir .ssh

    cd .ssh

    ssh-keygen -t rsa -C xxxxx@xxx.com(你的github账户)

    在github中添加ssh,如下图:

    Mac下github的使用
  4.  

    提交代码到github

    git config --global user.name "xxx"

    git config --global user.email "xxxxx@xxx.com"

    在你的项目目录下

    git init

    git remote add origin https://github.com/xxxxx/xxxxxx.git

    git add .

    git commit

    git push origin master

    END

注意事项

  • git remote add origin https://github.com/xxxxx/xxxxxx.git中得https地址就是你的github中的repository地址
  • 如果不想全部提交,可以在目录下增加一个.gitignore文件,里面写上不想add的文件或目录
 
 

转载于:https://www.cnblogs.com/alan-babyblog/p/5150820.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值