菜鳥才開始使用SourceTree,出現了兩個小問題,特此整理一下,希望對各位新手有幫助。剛開始以為裝了SourceTree就不用裝git了,其實不然,不裝git就會出現下面第一個問題:
1、新手使用SourceTree 一定要裝git客戶端才行,不然克隆遠程url會一直提示 “這是一個無效的源路徑/URL”(本人已經掉坑里一次了,希望讀者不要再犯這么簡單的錯誤)
如圖所示
原因:沒有啟用git(截圖忘記保存了)
解決辦法:工具 ——》選項 ——》 git, 啟用git 就可以了。
啟用之后如圖:
2、提交代碼到遠程的時候報錯,提示如下:
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\Users\AppData\Local\Temp\yo1s42oy.fz2 *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'Colin@JustForMoney.(none)')
如圖:
原因:沒有設置用戶名和郵箱
解決辦法:運行git;敲如下命令
git config --global user.email "you@example.com" git config --global user.name "Your Name"
設置完畢之后,就可以正常使用了。
原創作者:Jiao Shou
發布時間:2015年04月22日 - 12:10
最后更新:2015年04月22日 - 12:10
原始鏈接:http://www.cnblogs.com/jiaoshou/p/4447070.html
許可協議:轉載本篇文章時請務必以超鏈接形式標明文章原文鏈接和作者信息。

掃描二維碼,分享此文章