【问题标题】:SourceTree how to load my account username & email (from bitbucket, github)?SourceTree 如何加载我的帐户用户名和电子邮件(来自 bitbucket、github)?
【发布时间】:2017-01-05 21:37:54
【问题描述】:

您好,我在多个 git 网站上,例如 bitbucket、github 和 co。我有不同的用户名和电子邮件,但 Sourcetree 强制我输入我的姓名和电子邮件。所以它不会自行加载。

如果不登录(在网站上)并在 sourcetree 中查找我的电子邮件和类型,就无法使用他们网站上的我的帐户信息吗?在新项目中这有点烦人。

编辑:我的意思是换句话说:我想从 bitbucket、github 自动加载我的帐户信息,所以 我不需要每次都在新的 repo 上输入 并且每次都在他们的网站上检查什么用户名或电子邮件已设置。

就像问题是否可能一样。

【问题讨论】:

标签: github bitbucket atlassian-sourcetree sourcetree


【解决方案1】:

就像问是否可能

不是真的。
我要做的是:

在 Windows 上,我将这些别名定义为:

doskey gcu=git config user.name "Name1" ^&^& git config user.email email1@com
doskey gcu2=git config user.name "Name2" ^&^& git config user.email email2@com

然后,在一个 repo 中,我拼写错误(仅一次)gcugcu2,具体取决于该 repo 的性质。

如果我忘记输入它,我将无法在没有错误消息的情况下创建提交:

*** 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: no name was given and auto-detection is disabled

【讨论】:

    猜你喜欢
    • 2014-11-15
    • 1970-01-01
    • 2014-01-03
    • 1970-01-01
    • 1970-01-01
    • 2015-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多