Questions tagged [git-show]

Shows one or more objects (blobs, trees, tags and commits).

  • For commits it shows the log message and textual diff. It also presents the merge commit in a special format as produced by git diff-tree --cc.

  • For tags, it shows the tag message and the referenced objects.

  • For trees, it shows the names (equivalent to git ls-tree with --name-only).

  • For plain blobs, it shows the plain contents.

The command takes options applicable to the git diff-tree command to control how the changes the commit introduces are shown.

See the man page for more info.

78 questions
0
votes
1 answer

Different time values from different git commands

I am seeing that for a particular commit, git is giving different time stamp values for different commands. $ git show -s --format="%ci" ee9bb 2019-09-09 17:50:43 +0530 The above command shows time value as 17:50:43 While the below commands show…
samshers
  • 1
  • 6
  • 37
  • 84
0
votes
1 answer

How to list all changed or modified files from all commits in a branch

I need help to list all modified and changed branch files, but search all commits. The command I am using brings only the last commit. git show --stat nome_branch --oneline
0
votes
3 answers

How can I list files changed as part of a particular commit?

How can I list changes done as part of a particular commit in the format below? repo: agrawalo/interviewing branch: master commit: c917020b Batman! This commit has no parent author: Lokesh Agrawal at 2018-05-16T20:58:17+05:30 Summary of…
ThinkGeek
  • 4,749
  • 13
  • 44
  • 91
0
votes
1 answer

How to show only java files diffs with 'git show' command?

I am working on a java project but some output saved as csv file also tracked in the git. Sometimes the csv file changed completely so that the diff was very large. How to show java files diffs when using git show?
coder.chenzhi
  • 171
  • 1
  • 11
0
votes
2 answers

git diff: many patches with three '@' symbol

I am writing an automatic tool based on git show, which relies on git diff command. I wrote a small parser which takes the output of git show as the text to parse, and in most situations in the result the lines start with '@@' indicates which lines…
zsf222
  • 345
  • 1
  • 10
0
votes
1 answer

How to get the SHA of commit from diff output?

How can I get the SHA of the commit from diff output? For example I like to diff a binary file, the output of git show COMMIT is: diff --git a/0_prospektusok/FAR_feltetdiszek/feltetdisz_prospektus.xls b/0_prosp index 9993010..707c169 100644 Binary…
bimlas
  • 2,359
  • 1
  • 21
  • 29
0
votes
1 answer

Git show and get diff for a file subset

I am looking for a solution to get the difference of a commit using git show command. Usually I make: $> git show 12f00d And as expected, I get all diff for all files modified in the given commit. Now I have a big commit (many files…
рüффп
  • 5,172
  • 34
  • 67
  • 113
0
votes
1 answer

git show not working with python check_output

I am writing a python script in which I have to read the output of the git show command from the script. I decided to use python's subprocess.check_output function. But its giving me No such file or directory error. Running from python: >>> import…
Abhishek Gupta
  • 6,465
  • 10
  • 50
  • 82
0
votes
2 answers

save colored output from Git Show

Is there a way to save the colored output from a git show? I saw the post about using a different editor. But that is a lot more than what I'm trying to do. I just want to capture a report that is visually easy to read.
TrickySituation
  • 378
  • 4
  • 10
0
votes
1 answer

List files changed in Git with change information

In short I want this: git show --name-only (How to list all the files in a commit?) But I also want some indication of what kind of change it was, e.g. added, deleted, added/removed n lines, preferably still on a single line per file.
oyvind
  • 1,429
  • 3
  • 14
  • 24
0
votes
1 answer

git show for merges in TortoiseGit

If I call git show XYZ on a merge in the console, I only see the diff of the conflicting files. gitg, and I guess also many other graphical tools, are showing the same diff on selecting a commit. TortoiseGit is showing a diff to each parent…
mheinzerling
  • 1,035
  • 1
  • 10
  • 31
0
votes
1 answer

Making git show to show information in a machine parseable format

I have read parsing git log output, preferably as xml but that does not help. I am trying to get the following information about a Git tag. User that created the tag Message associated with tag creation if any The name of the tag (I know this as I…
Kannan Ekanath
  • 16,759
  • 22
  • 75
  • 101
0
votes
2 answers

have "git show" use opendiff on osx to show commits

I found ways to use opendiff for "git diff" but "git show" doesn't have quite the same options.
vaebnkehn
  • 113
  • 5
0
votes
3 answers

git show printing unwanted tag info

When using this command: $ git show -s --pretty=format:%H --all it prints…
Bo A
  • 3,144
  • 2
  • 33
  • 49
-1
votes
1 answer

What is the git command to get only the newly added/modified lines in a commit?

I want to write shell script to parse java source files and find-out the common violations in source code based on some rule. This script should run on new code which is added/modified , this shouldn't get the old code. My code repository is…
JavaUser
  • 25,542
  • 46
  • 113
  • 139