iOS-Github上託管本地項目

來源:互聯網
上載者:User

標籤:

有時候玩github難免會踩坑,記錄一筆流水賬,完整的講述一個項目在geihub上從無到有的過程->
1.github後台建立項目

2.設定項目

3.上傳本地已經存在的項目即需要託管的項目

3.1在終端 cd 到項目所在檔案夾內

3.2 $ git init (初始化一個本地的 git倉庫)

3.3 $ touch README.md (工程代碼的介紹)

3.4 $ git add README.md (添加到倉庫中)

3.5 $ git commit -m “first” (提交備忘)

3.6 $ git remote add origin https://github.com/qxuewei/XWBorderImage (添加本地倉庫origin和指定遠程倉庫地址 連結為剛才建立遠程倉庫的連結)

3.7 $ git pull –rebase origin master (pull 遠程倉庫到本地)

3.8 $ git push origin master (push 本地倉庫到遠程倉庫)

如果出現push到遠程倉庫確不顯示的情況就是本地github帳號沒有配置成功
需要在終端執行:
git config –global user.name “username”
git config –global user.email “[email protected]”
配置你自己的github帳號,尤其是郵箱,不能出錯!

最終你的項目就會成功託管到github上了->

參考連結:
http://stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to
http://www.techug.com/github-3
http://blog.csdn.net/duxinfeng2010/article/details/8654690

iOS-Github上託管本地項目

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.