Hi friends!“The nice thing about Git is that it’s very general. … There is a lot of stuff you can do with Git; it’s not just version control that it’s fun to play with.” - Scott Chacon, GitHub's co-founder A recent talk with the same title as this email was given by Scott Chacon, founder of GitHub, to students earlier this year. I was so inspired by it that I watched it repeatedly and decided to summarize the tips and tricks I discovered—features I didn’t even know existed after a decade of using Git daily. Git is getting close to 200 subcommands 🤯, here are some unknown yet super useful ones! 1. Conditional ConfigurationsDid you know you can set conditional configurations in Git? This allows you to use different settings for different projects. For instance, you can set a global email for most repositories and a specific email for work projects without changing settings manually every time. Just use a relative path in your config file and let Git handle the rest. Here’s an example git config:
2. Custom AliasesCreating custom aliases can save you a lot of time. For example, you can alias the stash command to include untracked files: Now, running ` 3. Reuse Recorded Resolution (rerere)Git’s
4. Enhanced Blame and LogUsing Similarly, 5. Code Movement AwarenessThe
New Git Features!Git continuously evolves, and here are some fresh additions:
That's it!I hope you found it useful. Please reply with any feedback or questions. Have a great weekend! |
Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!
Hi friends, Are you tired of juggling multiple apps for note-taking and writing? Many of us struggle to find a seamless system that combines powerful text editing with effective note organization. While popular note-taking apps offer fancy features, they often fall short for those who prefer a keyboard-centric, or should I say Vim-centric workflow. Most people resort to using dedicated note-taking applications like Obsidian, Notion, or even Apple notes. These tools are great for casual users,...
Hi friends, The Dotfiles Dilemma Ever felt like your computer settings are scattered everywhere? Those pesky dotfiles that control how your programs look and work can be a real headache to manage. The Old Way: Git and Stow Many of us have tried using Git to track changes in our dotfiles. Some even use Stow to create symlinks. But let's be honest – it's not always smooth sailing. Sometimes things don't line up right, and not every program plays nice with this setup. Why Traditional Methods...
Hey friends! Are you tired of juggling countless environment variables across different projects? Do you find yourself constantly tweaking your .zshrc or .bashrc with tokens, api keys or other project-specific variables? Well, I’ve got a game-changer for you! The Problem with Traditional .env Files We’ve all been there. You start a new project, set up a few environment variables in a .env file, and everything’s peachy. But as your project grows, so does your list of variables. Before you know...