gitk

学习笔记之Git / Gitflow / TortoiseGit

不羁岁月 提交于 2020-04-27 04:31:13
Git - Wikipedia https://en.wikipedia.org/wiki/Git Git ( / ɡ ɪ t/ ) is a version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development , but it can be used to keep track of changes in any set of files. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows. Gitflow Workflow | Atlassian Git Tutorial https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow Gitflow Workflow

如何从Git中的特定修订版本检索单个文件?

自闭症网瘾萝莉.ら 提交于 2020-04-25 09:52:46
问题: I have a Git repository and I'd like to see how some files looked a few months ago. 我有一个Git存储库,我想看看几个月前某些文件的外观。 I found the revision at that date, and it's 27cf8e84bb88e24ae4b4b3df2b77aab91a3735d8 . 我在那个日期找到了修订版本,它是 27cf8e84bb88e24ae4b4b3df2b77aab91a3735d8 。 I need to see what did one file looks like and also save that to a file. 我需要查看一个文件的外观,并将其保存到文件中。 I managed to see the file using gitk , but it doesn't have an option to save it. 我设法使用 gitk 来查看文件,但是它没有保存文件的选项。 I tried with command-line tools, the closest I got was: 我尝试使用命令行工具,但最接近的是: git-show 27cf8e84bb88e24ae4b4b3df2b77aab91a3735d8 my

Windows上的Git:你如何设置合并工具?

感情迁移 提交于 2020-03-05 21:21:22
我在Cygwin上尝试过msysGit和Git。 两者都可以很好地完成它们并且完美地运行gitk和git-gui。 现在我如何配置合并工具? (Vimdiff在Cygwin上工作,但最好是我想为一些喜欢Windows的同事提供一些用户友好的东西。) #1楼 我不得不在Windows 7上使用msysGit删除额外的引用,不知道为什么。 git config --global merge.tool p4merge git config --global mergetool.p4merge.cmd 'p4merge $BASE $LOCAL $REMOTE $MERGED' #2楼 我从他们的手册( http://manual.winmerge.org/CommandLine.html )使用名为WinMerge( http://winmerge.org/ )的应用程序 这是我通过 .gitconfig 从 mergetool 指令使用的bash脚本 #!/bin/sh # using winmerge with git # replaces unix style null files with a newly created empty windows temp file file1=$1 if [ "$file1" == '/dev/null' ] || [ "$file1" ==

在签出先前的提交后如何返回到最新的提交?

早过忘川 提交于 2020-02-26 00:09:01
我有时会检查一些以前版本的代码来检查或测试。 如果我想修改以前的提交,我已经看到了如何操作的说明 - 但是假设我没有做任何更改。 在完成例如 git checkout HEAD^ ,我如何回到分支的顶端? git log 不再向我显示最新提交的SHA。 #1楼 看看图形GUI ... gitk 它显示所有提交。 有时工作图形更容易... ^^ #2楼 如果你知道你想要返回的提交是某个分支的头部,或者被标记,那么你可以 git checkout branchname 您还可以使用 git reflog 来查看过去HEAD(或任何其他引用)指向的其他提交内容。 编辑添加: 在较新版本的Git中,如果你只运行 git checkout 或其他东西来移动 HEAD 一次,你也可以做 git checkout - 切换回上次结账前的任何地方。 这是通过类似于shell习语 cd - 动机 cd - 回到之前的任何工作目录。 #3楼 git checkout master master是提示或最后提交。 gitk 只会告诉你当时你在树上的位置。 git reflog 将显示所有提交,但在这种情况下,你只需要提示,所以git checkout master。 #4楼 刚刚遇到这个问题并有一些补充 要转到最近的提交: git checkout $(git log --branches -1 -

Git for windows launch gitk context menu with gitk-all

被刻印的时光 ゝ 提交于 2020-01-13 05:46:06
问题 I have Git for Windows installed. When I right click on a project and select Git History I get the Gitk window, but every time I do so I need to set the view to see all branches. Even when I edit the view and set it to Remember , I still do not get all branches on subsequent visits to Gitk. Alternatively, I can open the Bash window and type gitk --all for the same result. Both are inconvenient and I'd like to make the default behavior of rght clicking and selecting Git History to show gitk -

Is there any way to exclude branches from showing in GitK?

爷,独闯天下 提交于 2020-01-11 05:16:12
问题 Sometimes when I use GitK there's a load of commits on branches I'm not concerned with and they tend get in the way of what I'm doing. It would be nice to be able to specify which branches I want, or specify which branches I want to exclude. Is this possible? 回答1: You can specify which branches you want by specifying them as arguments to the gitk command. I'm assuming that you're already using --all , but you might be interested to know that there's also a --not flag...although it has some

Why is gitk not showing my local branch?

徘徊边缘 提交于 2020-01-02 02:19:14
问题 I'm learning about git and is using gitk to visualize my history and branches. I tried gitk on a locally initialized repo, and it is able to show both branches that I made properly. However, when I tried to launch gitk to visualize a repo obtained using git clone , gitk only shows one of the branches. This is what happen: After I did a git clone , I can see 1 branch locally: $ git branch * experiment So I did git checkout -b master origin/master to create my local tracking branch, now: $ git

Why is gitk not showing my local branch?

筅森魡賤 提交于 2020-01-02 02:19:04
问题 I'm learning about git and is using gitk to visualize my history and branches. I tried gitk on a locally initialized repo, and it is able to show both branches that I made properly. However, when I tried to launch gitk to visualize a repo obtained using git clone , gitk only shows one of the branches. This is what happen: After I did a git clone , I can see 1 branch locally: $ git branch * experiment So I did git checkout -b master origin/master to create my local tracking branch, now: $ git

How to avoid showing parent commits in gitk when filtering by author?

こ雲淡風輕ζ 提交于 2020-01-01 06:11:36
问题 I want to show only my commits in gitk. I try to use the command gitk --author="Eugeniy Maksimov" <path> gitk shows not only my commits, but also theirs parents. Why? How to avoid this? 来源: https://stackoverflow.com/questions/49219779/how-to-avoid-showing-parent-commits-in-gitk-when-filtering-by-author

How do you undo a hard reset in Git Gui or Gitk on Windows?

只谈情不闲聊 提交于 2019-12-23 17:54:29
问题 I'm using Git Gui and Gitk on Windows. How do I undo a hard reset from within the past two hours? (Is it possible to do this from these applications, without using the command line?) I saw this SO post, which says that undos are possible before git's garbage collection occurs. I might have quit and reopened one or both of these applications. 回答1: If you had changes in your working tree that were not committed when you did git reset --hard, those changes are gone for ever. You have to use your