git與ssh配置

目錄

ssh配置

windows下配置SSH密鑰:
https://docs.joyent.com/public-cloud/getting-started/ssh-keys/generating-an-ssh-key-manually/manually-generating-your-ssh-key-in-windows#putty

git配置

git教程:
https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c291467cc7c747b1810aab2fb8863508000

Git的使用–如何將本地項目上傳到Github:
https://blog.csdn.net/zamamiro/article/details/70172900
git 錯誤error: failed to push some refs to:
https://blog.csdn.net/winnershili/article/details/78888548
Git 提示fatal: remote origin already exists 錯誤解決辦法:
https://blog.csdn.net/top_code/article/details/50381432
git 出現 fatal: refusing to merge unrelated histories 錯誤解決方案:
https://www.centos.bz/2018/03/git-出現-fatal-refusing-to-merge-unrelated-histories-錯誤/
git刪除項目:
https://jingyan.baidu.com/article/2fb0ba4084070900f2ec5f1c.html

本地倉庫:
初始化:git init
查看改變的文件(夾):git status
添加全部修改文件:git add .
添加指定修改文件:git add filename1 filename2 filename3 (如果有多個文件空格隔開)
提交修改到本地倉庫:git commit -m “提交說明…”
關聯遠程倉庫與本地倉庫:git remote add origin https://github.com/wnismiddle/test.git
推送本地倉庫內容到遠程倉庫:
git push -u origin master
第一次推送要加上-u參數,之後上傳只需要:
git push origin master

Git鼓勵大量使用分支:
查看分支:git branch
創建分支(test):git branch test
切換分支:git checkout test
創建+切換分支:git checkout -b test
合併某分支到當前分支:git merge test
刪除分支:git branch -d test

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章