Fork me on GitHub

SourceTree 的初次使用的两个小问题

菜鸟才开始使用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"

 设置完毕之后,就可以正常使用了。

本文标题:SourceTree 的初次使用的两个小问题

原创作者:Jiao Shou

发布时间:2015年04月22日 - 12:10

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

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

许可协议:转载本篇文章时请务必以超链接形式标明文章原文链接和作者信息。

扫描二维码,分享此文章

posted @ 2015-04-22 12:10  较瘦  阅读(31727)  评论(0编辑  收藏  举报
知识点文章整理