Anytime you hear the term “Letting go” or “detachment” within spiritual practices and circles…this is probably the most practical, down to earth example of said terms I can think of.
In it, I explained how reading and troubleshooting config files in Linux are sometimes a pain in the rear. In particular, when the config files are long and mostly comments.
When we are troubleshooting, we want to know just the effective settings that are going to be loaded at run time and nothing else. And read them quickly.
The script I provided in that original post works, but I’ve iterated it into a more elegant solution.
When you’re learning Git (or anything for that matter) rapid and cheap testing, feedback, and failure can expedite the learning process from hours to minutes!
When you’re learning and experimenting with Git concepts like:
This subtle distinction may not seem like a big deal now, but soon this will make all the difference.
Reading Commits
Here is the output of the branch master from my local repo:
git log --oneline --graph --decorate
Given that commits always point back, we can trace our branch from Branch Pointer master (78f107a) all the way back down to our initial commit (7bc8a7a):
The totality of the entire trail from the most recent commit master (78f107a) all the way back down to our initial commit (7bc8a7a) is one branch.
Reading Multiple Branches
Here is where knowing commits point back, not forward, is REALLY going to help us out
First we expose ALL branches from my git repo:
git log --oneline --graph --decorate --all
In this output we now can see all branches laid out at once.
Reading the dev Branch
Here are a couple of things to remember when reading the commit history from command ‘git log’:
The previous commit(s) is denoted by following back to the previous asterisk(s), not necessarily the commit beneath it.
The vertical and diagonal bars actually do a great job of guiding us to the previous commit(s).