LogoJuan Manuel Allo Ron

Weekly Digest #6: Learning Git from novice to expert

By Juan Manuel Allo Ron on Apr 26, 2020

Recently I have been helping to create content to onboard new developers. One of the topics I prepared was Git. I have been using git for more than 12 years, and while doing research I was surprised to learn new things. So I decided to share some useful links with everyone.

  • First things first, in April Git turned out 15 years, so happy Birthday!

  • What’s git and how it changed the way we code. And check this quick article on how to get started with Git.

  • Super complete git cheatsheet. If you are looking for a printable version, check Github PDF cheatsheet.

  • If you are looking for some tutorials to learn the basics check BitBucket tutorials and an interactive way to learn branching.

  • You need autocomplete for the terminal. Check this tutorial on how to set it up

  • Also, I am lazy and I hope you too, so consider having some aliases for common commands. You can use something like git-alias or add your own to your terminal profile. Here are some of the ones I use:

    alias gs=”git status” alias gpull=”git pull --rebase” alias gm=”git commit -m”
  • While most of the time I use the terminal, sometimes I reach for a UI editor. Here is a list of the top 10 UI clients. I have used Sourcetree a lot in the past.

  • I found this article and blowed my mind. I use git diff a lot before making commits (just to make sure I am not adding anything unnecessary). In Better git diffs with FZF Rafael Mendiola shows how you can improve the git diff experience, navigate through files and see previews on the right! NOTE: the exact command on the post did not work for me, but I used this instead:

    fd() {   git diff $@ --name-only | fzf -m --ansi --preview "git diff $@ --color=always -- {-1}" }

    1t8hrt6aaeazyaihw3aoalg

  • If you use VS code, then it is worth it to check GitLens extension.

  • Some Github pro tips. I am planning to try OctoTree soon.

  • Also if you use Github intensively check this list of recommended Github integrations for 2020.

  • Lastly, 2 advanced commands that can help you in your darkest moments:

    • git bisect. Interactive way of walking trough commits to find specific changes.
    • git reflog. Not only commits can be rollbacked, Git keeps a log of all the actions, and you can go back in history too.

I want to end with a funny story. While we were doing prep for the presentation, I was showing a quick slide on what Git is and someone asked me: What does Git stands for? Honestly, I did not know so I did some research:

Git is not an acronym, in slang “git” means “a stupid person”. Linus Torvalds when he created the first version name it “the stupid content tracker” and that is how Git was born!

Enjoy!!


Catch up with me on X (twitter):@juan_allo

100 days of code
100daysofcode
Coding
Dev tools
Develop
Git
Github
Javascript
Programming
Weekly digest

Share

X Facebook Y Combinator LinkedIn Reddit Email

---

Similar Articles

Weekly Digest #5: 100 days of code

Apr 19, 2020
100 days of code was started by Alexander Kallaway in 2016 but recently it has been gaining more momentum (we all know why). Practice is the only way to master any discipline...

Weekly Digest #1

Mar 22, 2020
Best practices on JavaScript modularity: when to use named exports, how to group code and what to avoid. Check JavaScript Module Best Practices.
Two employees testing a web app

Thoughts on Snapshot Testing

Apr 14, 2020
Since I moved to react at work I have been using and trying different testing strategies and I wanted to share some thoughts and best practices around snapshot testing.
React Logo

Learning Path: Getting started with React

May 19, 2020
In this post I want to share some resources that helped me learn React and I hope they are useful for anyone starting out there.

@2024 Juan Manuel Allo Ron. All Rights reserved