Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show entire file in Gitkraken diff window

Tags:

git

gitkraken

I'm using Gitkraken and would like the entire file to be shown when taking a look at my changes - or atleast have an option to view the entire file. Currently it chops out "irrelevant" parts of the file.

Is there anyway to do this?

Thanks for your help!

like image 203
Jim Aho Avatar asked Apr 25 '17 13:04

Jim Aho


People also ask

How do I get the diff of a file in git?

By executing the git diff command, we can see the differences between these two files. By default, the git diff command produces a diff for all files between the latest commit and the current state of the repository.

Does git store diffs or whole files?

When you commit, git stores snapshots of the entire file, it does not store diffs from the previous commit. As a repository grows, the object count grows exponentially and clearly it becomes inefficient to store the data as loose object files. Hence, git packs them and stores them as a . pack file.

How to see commit History in GitKraken?

If you pull up the Fuzzy Finder using Command + P for Mac or Ctrl + P on Windows and Linux, you can type 'History,' and search GitKraken for the name of the file. Use the Fuzzy Finder to search your file history. Select the file, and you'll jump to that file's entire history.

How does git diff work internally?

The super-short version is that git status runs git diff . In fact, it runs it twice, or more precisely, it runs two different internal variations on git diff : one to compare HEAD to the index/staging-area, and one to compare the staging-area to the work-tree.


1 Answers

There is a File Blame feature, accessible by right-clicking the filename of an staged or unstaged file, that shows you the whole file along with info about who changed which line in which commit. It also allows you to show the state of the file for each commit listed on the left.

The feature you are asking for, to view more lines of context in a diff view (like you can set in gitk, for example), does not exist AFAIK.

EDIT: As of Version 4.0.0, GK finally allows to view and edit whole files. See GK Release Notes.

like image 167
kowsky Avatar answered Oct 05 '22 01:10

kowsky