0

I'm using git on my Mac machine. And trying SourceTree (is it free?)

I have committed and pushed files from local branch a to remote origin\a.

A colleague merged from origin\a to origin\b and I have pulled a local b.

I don't see my changes in local b.

1) How can I see all the files I have pushed to origin\a in the last week? (ui-tool? and cmd?)

2) how can I explore remote branches without pulling them? (ui-tool? and cmd?)

3) How can I pull from origin\b to local a, even though they are not configured as one being trackable of the other?

4) Any recommendation for freeware git ui-tool?

4

2 回答 2

1

首先,我建议阅读Scott Chacon 的 Pro Git,以了解如何使用 Git,因为您似乎对 Git 的一些基本概念有一些疑问。

其次,我将使用 git 终端命令依次回答您的每个问题。您将需要您的终端位于本地存储库的根目录,以使其中任何一个工作:

  1. 您可以通过以下方式找出哪些远程提交上有您的名字

    git log origin/a --author="<your_username>"

    在这里,your_username无论输出是什么git config user.name

    如果您想找出您在每次提交中编辑了哪些文件,请添加--name-only到您的日志命令中。

  2. 前面的命令就是这样做的。通常,任何将分支作为参数的命令也可以将远程分支作为参数,只要您在分支名称前加上远程名称,在这种情况下为origin.

  3. 使用命令

    git pull 原点 b

    当您将 locala签出以将更改从origin/blocal中提取出来时a

  4. 不幸的是,由于我从未使用过图形客户端,因此我无法为您提供任何建议,但我会告诉您为什么会这样,以便您自己决定是否需要一个。

    Git 拥有大量功能,使其功能强大,但任何图形客户端如果不希望用户花时间查看,则只能通过其界面公开一小部分功能在按钮和菜单的坚固墙上。这意味着如果您想使用未公开的功能,您将不得不进入终端,但您不会知道您在那里做什么,因为您已经花费了大部分时间在客户端的时间。我只是觉得从终端使用 Git 更有效率。

    也就是说,我简单地试用了Mac版 Gitx,并且没有抱怨它在日常 git 任务中的可用性。

于 2013-08-15T12:20:00.100 回答
0

我推荐使用源码树作为你的 gui 工具 http://www.sourcetreeapp.com/download/

源代码树将为您直观地显示所有文件 + 差异。

如果你想要简单的命令

gitk

在你的 bash 窗口中。

于 2013-08-15T10:24:40.913 回答