zoukankan      html  css  js  c++  java
  • SourceTree 的初次使用的两个小问题

    菜鸟才开始使用SourceTree,出现了两个小问题,特此整理一下,希望对各位新手有帮助。刚开始以为装了SourceTree就不用装git了,其实不然,不装git就会出现下面第一个问题:

    1、新手使用SourceTree 一定要装git客户端才行,不然克隆远程url会一直提示 “这是一个无效的源路径/URL”(本人已经掉坑里一次了,希望读者不要再犯这么简单的错误)

    如图所示

    原因:没有启用git(截图忘记保存了)

    解决办法:工具 ——》选项  ——》 git, 启用git 就可以了。

    启用之后如图:

    2、提交代码到远程的时候报错,提示如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:UsersAppDataLocalTempyo1s42oy.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;敲如下命令

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

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

  • 相关阅读:
    洛谷 P2370 P2370 yyy2015c01的U盘
    洛谷 P1214 等差数列
    洛谷 P1483 序列变换
    洛谷 P2032 扫描
    洛谷 P2846 光开关
    洛谷 P2872 道路建设
    Codeforces Round #510 #C Array Product
    Codeforces Round #510 #B
    Codeforces Round #510 #A
    关于各种数字倍数的判断
  • 原文地址:https://www.cnblogs.com/soundcode/p/7212176.html
Copyright © 2011-2022 走看看