美文网首页
sourcetree上传时遇到的问题

sourcetree上传时遇到的问题

作者: 枫林雨落 | 来源:发表于2019-04-09 17:35 被阅读0次

用sourcetree的分之创建与合并

第一次使用sourcetree,刚开始都不知道那些都代表什么意思(虽然还是中文版,感觉比命令还难),就在网上不断地搜,找可以用的、可以理解的资料,终于有一点点明白要怎么把自己改的东西上传。

必要提醒:装sourcetree一定也要装git,不然克隆的时候会提示“这是一个无效源路径/url”,然后还要启用git,点击‘工具->选项->Git’

同时sourcetree中也可以配置 beyond compare,前提是你的电脑上装了beyond compare,然后打开‘工具->选项->比较’

示例

beyond compare 下载地址    提取码:m5e0

二、好不容易有点眉目提交代码,又遇到错误

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"

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

三、设置用户名时可能报错

fatal: not in a git directory

第一次使用git,在设置邮箱的时候报错了。

说是没有这个目录。我的情况比较简单,是因为我没有将当前目录作为git目录。

先执行命令 git init 。

再执行git config user.email “email@test.com” 就可以了

那么你可以在你的仓库目录下,右击鼠标,在此处打开命令窗口。在cmd执行此语句。就行了

相关文章

网友评论

      本文标题:sourcetree上传时遇到的问题

      本文链接:https://www.haomeiwen.com/subject/gwhiiqtx.html