phpstorm上配置git環境的配置總感受很簡單,沒發現看似簡單的東西浪費我好多時間。我在網上查了一下關於phpstorm的git環境的配置沒有具體的總結 因此我把本身的配過程簡單總結了一下php
接下來是個人配置環境的具體步驟git
$ git config --global user.email "zhangsan@gmail.com"
若是沒有密鑰則不會有此文件夾,有則備份刪除
2.生存密鑰:github
最後獲得了兩個文件:id_rsa和id_rsa.pub shell
打開https://github.com/ ,登錄zhangsan,而後添加ssh。編程
5:測試:ssh git@github.combash
成功狀況: The authenticity of host ‘github.com (207.97.227.239)’ can’t be established.服務器
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘github.com,207.97.227.239′ (RSA) to the list of known hosts.ERROR: Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell accessConnection to github.com closed.
$ git clone git@github.com:billyanyteen/github-services.git(2):.這樣你的機器上就有一個repo了。ssh
(3):.git於svn所不一樣的是git是分佈式的,沒有服務器概念。全部的人的機器上都有一個repo,每次提交都是給本身機 器的repophpstorm
倉庫初始化:分佈式
git init生成快照並存入項目索引:
git add文件,還有git rm,git mv等等…
項目索引提交:
git commit
(4):.協做編程:
將本地repo於遠程的origin的repo合併,
推送本地更新到遠程:
git push origin master更新遠程更新到本地:
git pull origin master補充:
添加遠端repo:
$ git remote add upstream git://github.com/pjhyett/github-services.git重命名遠端repo:
$ git://github.com/pjhyett/github-services.git爲「upstream」