Reputation: 19675
Git does not store branch history, since a branch is just a kind moving label on a commit history.
But it is important for me to see whether certain code changes were pushed to master on a certain date. (The server got code on that date.)
What's the idiomatic way to do this?
Upvotes: 1
Views: 170
Reputation: 24060
In general, you can't do this, by design. You can tell if a commit is on a branch, and you can tell when the commit was created, but you aren't necessarily going to be able to answer the question that you want to.
There are alternatives however, which may be of use.
git merge --no-ff
when merging onto the master branch. That will create a merge node even if it's unnecessary from a DAG perspective. You can then encode in the git message that it's a merge to master, and that becomes your point of truth for later analysis.gc.reflogExpire
option. You may want to disable explicit calls to this if you have access to the local repository.Upvotes: 3