git+github使用

來源:互聯網
上載者:User

git+github使用 1.在github上建立一個Repository,基本資料完成後記下git@github.com:xxx/xxx.git.2.本地配置使用者名稱和郵件配置預設會在 ~/.gitconfig   www.2cto.com    #git config --global user.name "username"  #git config --global user.email wanghuafire@gmail.com產生key,預設會在/root/.ssh/id_rsa.pub,把裡面的所有內容都copy到github的accounting下面的ssh keys裡面   #ssh-keygen -C 'wanghuafire@gmail.com' -t rsa3.提交項目  www.2cto.com    #cd project_name  #git init  #git commit -m "test"  #git add .  #git remote add user_name git@github.com:xxx/xxx.git  #git push user_name masteruser_name可以你自己指定 最初的時候我一直都是需要使用者名稱和密碼認證,提交失敗,返回403,然後是error,可以修改在你項目目錄下./git/config url = https://github.com/xxx/xxx.git==>>修改url = git@github.com:xxx/xxx.git然後在你github上git地址採用ssh提交就行了。 更新本地代碼之後  #git status ==>> 可以查看當前代碼更新後狀態,是否提交到倉庫裡了 #git add . #git commit -m "test debug" #git push user_name master 你就可以在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.