gitk | gitk graphical git repository viewer | Command Line Interface library
kandi X-RAY | gitk Summary
kandi X-RAY | gitk Summary
Fork of the gitk graphical git repository viewer. The canonical repository is git://ozlabs.org/~paulus/gitk.git Post patches to the git mailing list and prefix the subject with 'gitk:'
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gitk
gitk Key Features
gitk Examples and Code Snippets
Community Discussions
Trending Discussions on gitk
QUESTION
When I am using gitk
GUI and I checkout to (create) remote-tracking branch (right-click and checkout) (origin/type/branch
), branch named branch
is created - not type/branch
. Is there possibility how to preserve also the part before the last slash?
ANSWER
Answered 2021-Jun-08 at 09:02Unfortunately, at the moment there is no way to make gitk preserve anything before the last /
when creating a local branch from a remote tracking branch.
You need to use the CLI, or you may want to consider some other graphical tools, i.e. SourceTree.
QUESTION
Just for context, I've got a Git repo with a number of remotes, some of which I consider less important and put in a subgroup by prepending them with a group name and a slash. For example, I might have origin
, othercomputer
as my "main" remotes; and otherpeople/alice
, otherpeople/bob
as secondary remotes that I just check in on occasionally. I was looking for a simple way to make gitk
only list branches in my main remotes (since gitk --all
lists everything).
Just as a random thing, I tried running gitk \*
, and frankly to my surprise, it seems to have done exactly what I was looking for (displaying my local branches and my "main" remotes), so I tried to figure out what it actually does. Since the arguments to gitk
are mostly the same as those to git rev-list
, I've been trying to read that manpage in order to do that, but I can't find anything.
So, what does gitk \*
do, and where is this documented? (I assume that it is documented, since Git documentation is generally quite excellent.)
(Just to avoid confusion, the backslash in \*
is the shell escape to pass the asterisk unmodified to gitk
. I did not mean to imply that I'm actually passing that backslash to gitk
.)
ANSWER
Answered 2021-Jun-03 at 21:13gitk *
(with the star quoted from the shell) causes gitk
to run:
QUESTION
Dears,
I want to delete a very old commit on git repo, but after execute the rebase process and making a checkout to the last branch of my repository the proccess is being undone. So, this is what I'm doing:
...ANSWER
Answered 2021-May-20 at 16:12The problem is this line, which you say you're doing "just for readability":
QUESTION
Say I have a git-cc
executable in PATH
. If git-cc
supports --help
, then it is easy to provide adequate completion with
ANSWER
Answered 2021-Apr-07 at 13:49What to do?
Just define a function that does the compiletion with leading _git_
prefix.
QUESTION
Under Kubuntu 18 with project at bitbucket I need to review all changes during development made to some file.
I found this How to view file history in Git? branch , but trying to check all updates of resources/js/app.js file I got errors :
...ANSWER
Answered 2021-Mar-07 at 10:53Git told you:
QUESTION
ANSWER
Answered 2021-Feb-19 at 03:00Type git revert (unwanted commit hash)
You can get the unwanted commit hash by using git log —oneline
, to get the commit hash e.g cdb76bf
QUESTION
I have regularly committed my progress and wanted to push it today.
For some reasons I got an error having a deattached head and (deny updating a hidden ref)
. Now, after doing various steps in order to reattach it my work is gone. I'm unable to recover it or even find these commits. I committed frequently but didn't push. Now I'm somewhat lost on what to do.
Here's the history, I thought I'm on the branch Feature_SaveAs_Unfinished
.
ANSWER
Answered 2021-Feb-04 at 10:54Run git reflog
to get Git to spill out the contents of the HEAD
reflog. This will get you commit hash IDs (on the left), numbered @{...}
suffixed names (next to the hash IDs), and information about what made that the commit that HEAD
identified (for commits, that's commit subject lines).
If one of the subject lines looks promising, try that commit hash ID: e.g., git show hash
. If that's the commit you're looking for, you've found it: make a branch name for it. If not, keep going with the reflogs. To make a new branch name newname
that points to a given commit hash hash
, use git branch newname hash
.
Given that you have some data you can search for (or a blob hash ID like 9dc18eb8bba4d381ad0a96c782fec57928dc92d2
—see the output of git show 9dc18eb8bba4d381ad0a96c782fec57928dc92d2
to see if that's a file of interest, for instance) you can also search the commits in the reflog to see if any of them have, in their snapshots, a file with that blob hash ID. That's usually less effective than the quick "look at the top few reflog entries" method, but note that git ls-tree -r hash | grep 9dc18eb8bba4d381ad0a96c782fec57928dc92d2
is a way to find out whether the given commit hash ID hash
refers to that version of the file.
Side note: the answer you linked referred to someone who was in the middle of a git rebase
when they did stuff on their detached-HEAD setup, and then lost it; the commands you quoted are useful after you've set up a branch name to be able to find the commits.
QUESTION
my system is macOS Catalina 10.15.7 (19H2)
I installed git via brew, below shows the version installed
...ANSWER
Answered 2021-Jan-13 at 19:52This worked for me after I did brew upgrade git-gui
QUESTION
Let's say I have a few commits in a large repository with many branches.
...ANSWER
Answered 2020-Dec-25 at 06:32As per comments, it turns out commit 5643f6a7c
is in fact a merge commit. The git show
command has special handling for merge commits and winds up showing no diff for this file.
The reason git show
winds up showing nothing is a little bit complicated in full detail, but has to do with the following:
- Each commit contains a full snapshot: a copy of every file as of the form it had at the time you (or whoever) made that commit.
- Each commit also contains information about the commit itself. We call this the commit's metadata, to distinguish it from the main data (the snapshot). This includes the name and email address of the person who made commit, for instance. It also includes the raw hash ID of the commit's parent commits.
It's the parent linkage, from a commit to its predecessor commit or commits, that allows Git to show you a diff. Most commits have just the one parent. Given that commit C
follows earlier commit B
, and both commits have snapshots, Git can simply extract—to a temporary area (in memory or whatever)—both snapshots and then compare them. For each file that is the same, Git says nothing. For each file that is different, Git prints the name of the file and a recipe. Apply the change-recipe and this will transform the copy of the file as it appears in commit B
to make it match the copy of the file as it appears in commit C
.
This recipe, for changing parent commit B
into child commit C
, is one form of a diff. This diff is what git show
shows, after printing a selected (and formatted) part of the metadata from commit C
. The git show
command can do this because there is only one earlier commit: commit B
precedes commit C
so whatever changed between B
and C
is what is of interest. Adding one or more path-names to a git show
command limits the diff to just what changed in the selected file(s).
This whole idea fails when applied to a merge commit. A merge commit is a commit with two or more parent commits. Other than having the two or more parents, a merge commit is like any other commit: it has a snapshot and metadata.
In general, we get merge commits by running git merge
. (There are other ways to make merge commits and git merge
does not always make merge commits, so there's no guaranteed one-to-one correspondence here, but that's the usual way to make a merge. Note, by the way, that the noun form, a merge, refers to a merge commit, probably made by git merge
; the verb form, to merge, is the process that git merge
uses to come up with the content for the snapshot.
The merge process actually involves at least three commits. We can see how a typical merge comes about by drawing the setup we get if we have two divergent branches:
QUESTION
When starting gitk command line getting the error. It's strange because I have newest version of Mac OS 11.1 I just upgraded git but it doesn't helped. Any ideas what to do?
...ANSWER
Answered 2020-Dec-17 at 08:19Solved it by running brew install tcl
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page