Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git show <commit> --oneline not showing oneline

Tags:

git

msysgit

I am using version 1.8.3 of mysysgit and it seems that the --oneline command does not give me just one line per commit, I get all of the diff lines as well.

git show HEAD --oneline

and even git show HEAD --pretty="%h %s"

do not give just one line.

(note: same results using both git bash and posh git)

The reason I want the show --oneline is I want to pipe the results of a rev-list query into it from posh git.

git rev-list <somestuff> | %{git show $_ --oneline}
like image 503
Tim Jarvis Avatar asked Jun 21 '13 00:06

Tim Jarvis


People also ask

How can I see Unpushed commits?

We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.

How do I view commit hash?

If you have the hash for a commit, you can use the git show command to display the changes for that single commit. The output is identical to each individual commit when using git log -p .

How do I see all commits?

On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.

How do I display a commit?

The HEAD reference always points to the last commit of the current branch. Therefore, you can use git-show to display the log message and diff output of the latest commit.


1 Answers

I think this'll do what you want git show --no-patch --oneline

like image 69
Justin Avatar answered Nov 03 '22 13:11

Justin