Mastering Git
Study superior git log
21 hours in the past
If in case you have been working with Git, you may be aware of git log
command. Past its primary utilization (i.e. plain git log
), the superior use of this command might be fairly highly effective, making navigation of repository’s historical past seamless and informative. On this submit, we’ll be taught just a few helpful methods to make use of git log
to carry your Git data to the subsequent stage.
This submit assumes that the reader, you, are aware of the essential utilization of Git. For those who want a refresher on Git fundamentals, it’s possible you’ll need to try this text first. To make most of this submit, I encourage you to follow utilizing the instructions as you learn by the article. We be taught quicker after we are actively practising new data than passively studying by it.
We’ll use one in every of my favorite GitHub repository: ABSphreak/readme-jokes: 😄 Jokes to your GitHub READMEs to exhibit using instructions. This superior light-weight repository allowed me to incorporate random programming jokes in my GitHub profile. Let’s begin by cloning the repo domestically, go contained in the repository and run easy git log
to refresh how the command outputs seem like:
git clone https://github.com/ABSphreak/readme-jokes
cd readme-jokes
git log
The output rapidly fills up our window and is bit wordy. Some particulars resembling e-mail handle within the output might not be significantly helpful more often than not. Let’s discover ways to get extra succinct log.
For those who merely need to test earlier commit messages with out additional particulars, we are able to add --oneline
choice to get extra concise output:
git log --oneline