有用的git指令

查看remote狀態,將http改爲SSH
解決此類問題:unable to access;Failed connect to github.com

git remote -v
origin  https://github.com/USERNAME/REPOSITORY.git (fetch)
origin  https://github.com/USERNAME/REPOSITORY.git (push)
git remote set-url origin git@github.com:USERNAME/OTHERREPOSITORY.git

重置作者信息,修改SSH公匙:

git config --global user.email "[email protected]"
git config --global user.name "your name"

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