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
1
vote
1 answer

How to specify path when doing git show on a merge commit

I've got a merge commit, and I can show the entirety of it using git show -m. However, if I want to only show the change for a subfolder or a path, how do I do it? I tried doing git show -m -- app/ but it didn't show anything, even though git show…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
1
vote
2 answers

git show -- output only displays summary

I'm having trouble with all git commands that display the log/history of a repository. This issue is ONLY limitied to one of my repositories. I have several others that work just fine. For the repo with issues, I only see the summary of the commit,…
JayT
  • 35
  • 6
1
vote
4 answers

How do I match all but the first matches in a line with sed?

I'm doing my commit messages in Git with a certain pattern to ease creation of a changelog for new releases (https://stackoverflow.com/a/5151123/520162). Every change that should be taken into my changelog gets prefixed with CHG, NEW or FIX. When it…
eckes
  • 64,417
  • 29
  • 168
  • 201
1
vote
0 answers

Git diff shows changes that aren't in a commit

Something happened to our dev branch such that a lot of code from the release branch got merged into it. I'm trying to track down where these changes occurred but I get some very puzzling results. When I run git diff HEAD@{2} it shows a list of…
Michoel
  • 834
  • 5
  • 16
1
vote
3 answers

Git merged branch's last commit/committer

May be its asked already but I couldn't find it in here. I have a branch FEATURE merged into a branch STABLE and currently when I do git show from STABLE am getting the last commit which is commit 265d684b67e66ba762bd438c44e49881f7fd571b Merge:…
raksja
  • 3,969
  • 5
  • 38
  • 44
0
votes
1 answer

git show results in fatal: ambiguous argument unknown revision or path not in the working tree when branch contains forward slash (/)

I created a branch called "feature/my-third-branch" and created a hidden folder with a simple text file. If I switch to another branch and try to view this file using "git show" I get an error. If I repeat the "git show" to another hidden folder in…
aenagy
  • 37
  • 6
0
votes
2 answers

confused about 'git diff' and 'git show' on branch

Background: I'm on a feature branch which has diverged pretty significantly from master. I believe there are five files which have been modified on this branch. I've discovered that one of them should not have been modified at all, so I want to…
Steve Summit
  • 45,437
  • 7
  • 70
  • 103
0
votes
0 answers

How to see changes related to specified commit hash

I want to see the file changes for specified commit I got commit hash using git reflog
0
votes
1 answer

git show name only with filename containing special char interpret the character

I have a commit number , and I want to get all the file from the commit number and then display them in a text file, where latter on, I will loop in the file and checkout each of them. I have manage to do it with the following command : git show…
vanessen
  • 1,125
  • 1
  • 12
  • 19
0
votes
2 answers

git show: confusing behavior when showing past version of a file

I want to see a historical version of a given file: .zshrc This will show me all commits where this file changed: git log .zshrc ... ... Now for given commit, I want to see the whole file. But the following actually does not show the file. It shows…
400 the Cat
  • 266
  • 3
  • 23
0
votes
2 answers

How to print commit dates in %Y%m%d format in git log?

I am trying to print the commit date in 2021April09 format using --date=format:'%Y%b%d' but it gives me segmentation fault. Neither of below works for me even for standard formats. git log --pretty=format:%cd --date=format:%Y%m%d -5 git log…
Garry S
  • 79
  • 9
0
votes
2 answers

How to show a git message body (not just the title)?

I've been doing a fair amount of research and can't find this trivial functionality: git log and git show are only showing the headline/title of the commit message, but I'd like to see the rest of the body. By body, I mean the section where…
neaumusic
  • 10,027
  • 9
  • 55
  • 83
0
votes
2 answers

What does HEAD~n^k does on git?

I notice that one can specify ancestors of actual commit by using the ^ or the ~ character. For example, if I have the following log of commits * 1990f31 Somme third commit message * k135145 Somme second commit message * 2c13521 Somme first commit…
Miguel Trejo
  • 5,913
  • 5
  • 24
  • 49
0
votes
1 answer

How can I extract filepaths and changes from a commit or pull request using git?

I'm trying to get a consolidated list of changes (file paths and new/modified/deleted changes) from a commit/pull request in Github. This is the format I'm trying to aim for: filepath/to/some/file.properties:thisIsAKey=This is the string for this…
0
votes
1 answer

Switching from svn to git: Can searching logs for svn commit and showing commit in git be done in a one-liner?

I know that you can search for an svn commit after running git svn using the git log command. Example searching for svn commit r88843: git log --grep=git-svn-id:.*@88843 Then you can use the git commit hash to pass into git show Can this be done…
NathanC
  • 3
  • 4