Mac下github的使用
生活随笔
收集整理的這篇文章主要介紹了
Mac下github的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
新建github賬戶
新建Repository,如下圖:
建立連接github的秘鑰
打開mac的shell
cd ~
mkdir .ssh
cd .ssh
ssh-keygen -t rsa -C xxxxx@xxx.com(你的github賬戶)
在github中添加ssh,如下圖:
提交代碼到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
總結
以上是生活随笔為你收集整理的Mac下github的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spark 读 Elasticsearc
- 下一篇: flash _currentframe+