2

I know that we can do git checkout based on a date (git checkout by date).

Example:

git checkout `git rev-list -n 1 --before="2009-07-27 13:37" master`

However, how can we create a GIT branch based on the date?

Community
  • 1
  • 1
Alex
  • 7,007
  • 18
  • 69
  • 114

1 Answers1

2

One way you could create a branch would be to just use git checkout -b from the commit on which you find yourself after doing the git checkout you described in your question. That is, try the following:

git checkout `git rev-list -n 1 --before="2009-07-27 13:37" master`

and then

git checkout -b some_branch_from_above_date
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360