SourceTree 的初次使用的兩個小問題

菜鳥纔開始使用SourceTree,出現了兩個小問題,特此整理一下,但願對各位新手有幫助。剛開始覺得裝了SourceTree就不用裝git了,其實否則,不裝git就會出現下面第一個問題:html

 

一、新手使用SourceTree 必定要裝git客戶端才行,否則克隆遠程url會一直提示 「這是一個無效的源路徑/URL」(本人已經掉坑裏一次了,但願讀者不要再犯這麼簡單的錯誤)git

如圖所示ide

緣由:沒有啓用git(截圖忘記保存了)工具

解決辦法:工具 ——》選項  ——》 git, 啓用git 就能夠了。post

啓用以後如圖:this

二、提交代碼到遠程的時候報錯,提示以下:url

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)')

  如圖:spa

緣由:沒有設置用戶名和郵箱code

解決辦法:運行git;敲以下命令htm

 git config --global user.email "you@example.com"
 
 git config --global user.name "Your Name"

 設置完畢以後,就能夠正常使用了。

本文標題:SourceTree 的初次使用的兩個小問題

原創做者:Jiao Shou

發佈時間:2015年04月22日 - 12:10

最後更新:2015年04月22日 - 12:10

原始連接:http://www.cnblogs.com/jiaoshou/p/4447070.html

許可協議:轉載本篇文章時請務必以超連接形式標明文章原文連接和做者信息。

掃描二維碼,分享此文章

相關文章
相關標籤/搜索