DEV Community

Cover image for View list of GitHub commits within the specified date range
Dhairya Shah
Dhairya Shah

Posted on • Originally published at codewithsnowbit.hashnode.dev

11 1

View list of GitHub commits within the specified date range

Hello Folks 👋

What's up friends, this is SnowBit here. I am a young passionate and self-taught frontend web developer and have an intention to become a successful developer.

Have you ever needed to get the previous commits of your project within a specific amount of time?

Today, I will show you a very important git command that prints a list of GitHub commits within the specified date range.


Let's dive into the terminal

Let's print all commits in the specified date range.

  • Using the following command to log all the commits between <date-from> and <date-to>. ```bash

git log [--since=] [--until=]


**Let's run the command  ✌️**
- Go to your project library (make sure the repository is git initialized).
- Open terminal 😎
- Run the following command:
```bash


git log --since='Feb 10 2022' --until='Feb 28  2022'


Enter fullscreen mode Exit fullscreen mode

Here's the output of this command
commits command output
Isn't this a cool command?

  • You can even use the following command ```bash

git log --since='3 weeks ago'


- To exit, press `Q`

---
So, this was it for this article. I hope you learnt something new and enjoy reading. Stay tuned for the next article. 

Let's connect on Twitter - [@codewithsnowbit](https://twitter.com/codewithsnowbit)

### 🌏 Let's connect
- [GitHub](https://github.com/codewithsnowbit)
- [Twitter](https://twitter.com/codewithsnowbit)
- [YouTube](https://www.youtube.com/channel/UCNTKqF1vhFYX_v0ERnUa1RQ?view_as=subscriber)

[![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7242fho13cwcxlh8jutn.png)](https://www.buymeacoffee.com/codewithsnowbit)

Enter fullscreen mode Exit fullscreen mode

AWS Q Developer image

Your AI Code Assistant

Implement features, document your code, or refactor your projects.
Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (4)

Collapse
 
devkiran profile image
Kiran Krishnan

Good tip.

Collapse
 
dhairyashah profile image
Dhairya Shah

Thank you! @devkiran

Collapse
 
curiousdev profile image
CuriousDev

Thanks for this useful Git command!

Collapse
 
dhairyashah profile image
Dhairya Shah

You're welcome!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay