Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: Log for 'master' only goes back to date bug?

When I do the following in my working copy:

> git diff 'master@{1 hour ago}'

It prints

warning: Log for 'master' only goes back to Thu, 14 Jan 2016 15:37:11 -0500.

Yet when I do git log master, it clearly goes back farther:

commit bb9c80fb1c3895a9c11f7a60710497cc8406e71f
Author: Andy Edwards <[email protected]>
Date:   Tue Jan 12 22:44:21 2016 -0600
...

Am I doing something wrong, or is this a git bug?

like image 740
Andy Avatar asked Jan 14 '16 20:01

Andy


People also ask

Why git pull says already up to date?

git pull 's job is to fetch new commits and merge them into the current branch. If the current branch is not outdated compared to the one you pull from, pull will say Already up-to-date. even if you have local changes in your working directory.

How far back does git Reflog go?

By default, the reflog expiration date is set to 90 days. An expire time can be specified by passing a command line argument --expire=time to git reflog expire or by setting a git configuration name of gc. reflogExpire .

What is the difference between git Reflog and log?

The biggest difference between Git reflog vs. log is that the log is a public accounting of the repository's commit history while the reflog is a private, workspace-specific accounting of the repo's local commits. The Git log is part of the Git repository and is replicated after a push, fetch or pull.

Does git log show all branches?

Many times it's useful to know which branch or tag each commit is associated with. The --decorate flag makes git log display all of the references (e.g., branches, tags, etc) that point to each commit.


1 Answers

Use git-whatchanged instead.

git whatchanged --since="1 hour ago" --patch
like image 115
sanmai Avatar answered Sep 24 '22 12:09

sanmai