原文地址:http://blog.csdn.net/huahua78/article/details/52330792
---------------------------------------------------------------------------------
-
查看遠端地址?
git remote –v
?
查看配置?git config --list
git status
- 1
- 2
- 3
- 4
設置遠端倉庫地址?
git remote set-url origin 你的遠端地址
?
git push origin master出現以下情況:解決辦法:刪除當前key,然后重新生成key,
會在本地C:\Users\你的用戶名.ssh生成文件夾,里面有id_rsa和id_rsa.pub兩個文件?
然后復制id_rsa.pub文件里面的內容,到https://github.com/settings/keys新建一個,?
?
設置遠程地址:(上面新建的)?
git remote add origin_new 新的地址?
git remote –v查看?
git push origin_new master重新推送?
下面是設置用戶名?
Git config –global user.name “用戶名”?
git config –global user.email 郵箱地址設置代理:?
git config –global https.proxy?http://127.0.0.1:1080?
取消設置代理:?
git config –global –unset https.proxy取消git init操作時出現?rm: cannot remove ‘.git’: Is a directory?
是因為輸入的命令是:?rm -f .git?
解決辦法:rm -rf .git?即刪除整個.git目錄failed to push some refs to ‘git@github.com:*.git’ hint: Updates were rejected ···?
使用git push origin master的時候出現一下錯誤:解決辦法:?
git push -f origin master或者git pull下恢復不小心刪除的?git stash?文件:
- 1
- 2
- 3
git 回滾提交
- 1
- 2
- 3
- 4
- 5
- 6
錯誤:Please enter a commit message to explain why this merge is necessary.?解決辦法:?
1. (可選)按鍵盤字母 i 進入insert模式?
2. (可選)修改最上面那行黃色合并信息?
3. 按鍵盤左上角”Esc” (退出insert模式)?
4. 輸入”:wq”,按回車鍵即可(提交)
版權聲明:本文為博主原創文章,未經