github

GITHUB倉庫:https://github.com/oleryu/plugins.git

方法與步驟
1. 注冊賬號、建立一個倉庫.
2. 配置本的SSH KEY
生成KEY的命令如下:
$ cd ~/.ssh
$ ssh-keygen -t rsa -C "emailaddress"
如圖?github ssh-keygen
在 ~/.ssh 目錄下生成兩個文件 id_rsa.pub 和 id_rsa,id_rsa.pub 內(nèi)容需要配置到github.com。

3. 增加ssh key 到github中
如圖?github SSH keys
(1、如果你有多臺電腦同步代碼,建議將title填寫為地名,盡量不要使用中文)(2、key框中,請查看home文件夾中的.ssh/.._rsa.pub 將文件里面的文本全部復(fù)制到Key框中即可;

4. 同步
$ git clone git@github.com:oleryu/plugins(注:此處的oleryu為你自己的賬號名,plugins為你在github中創(chuàng)建的倉庫名稱)
git clone

5. 上傳
$ git add sys


$git commit -m "test"
*** Please tell me who you are.
Run
? ? ? ? git config --global user.email "you@example.com"
? ? ? ? git config --global user.name "Your Name"
? ? ? ? to set your account's default identity.
? ? ? ? Omit --global to set the identity only in this repository.? ?
? ? ? ? fatal: empty ident name (for <(null)>) not allowed?


$git config user.name "mr.yhl@163.com"
$git config user.email "mr.yhl@163.com"
$ git commit -m "test"
[master (root-commit) 4e1bfe0] test
1 file changed, 7 insertions(+)
create mode 100755 sys/test/60_test-metric.sh


$git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add
and then push using the remote name
git push


$git remote add plugins https://github.com/oleryu/plugins.git


$git push -u plugins
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream plugins master


$git push -u plugins master
Username for 'https://github.com': mr.yhl@163.com
Password for 'https://mr.yhl@163.com@github.com':
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 544 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To https://github.com/oleryu/plugins.git
* [new branch]? ? ? master -> master
Branch master set up to track remote branch master from plugins.

git clone git@github.com:oleryu/plugins(注:此處的oleryu為你自己的賬號名,plugins為你在github中創(chuàng)建的倉庫名稱)

git remote add plugins git@https://github.com/oleryu/plugins.git

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容