git Tutorials

  • By
    Automatically Rebase GitHub Pull Requests

    Working on an open source project with a thriving contribution community is one of the great joys I have at Mozilla. In leading this charge, I get to meet amazing people of all different skill sets and interests, as well as different points of...

  • By
    Detect git Directory with Bash

    One interesting aspect of working at Mozilla is that Firefox lives in a mercurial repository while several other projects live on GitHub in a git repository. While most focus on either Firefox or another project, I switch between both, leaving me running git commands inside...

  • By
    5 Essential git Commands and Utilities

    For many of us, git and GitHub play a huge role in our development workflows. Whenever we have a tool that we need to use often, the more fine-tuned we can make that tool, the faster we can get things done. The following are five git...

  • By
    How to Set a Default Commit Message

    Having a default commit message is really useful for a number of reasons:It can formalize your commit messagesIt serves as a good reminder for the information you should add to your commit message, like issue numberIf you set it to "Drunk AF, don't accept this"To set...

  • By
    Mercurial Tips

    While most of the world seems to be using git for version control, Mozilla continues to use Mercurial (hg) to manage the Firefox source code. As a git and GitHub lover, it took me a while to get used to Mercurial. I...

  • By
    Checkout the Last Public Revision with Mercurial

    I've always preferred git over Mercurial (hg) because the feature branch workflow makes organizing code and working off of master very easy. You don't get that with vanilla mercurial -- instead, commits can just sort of apply on top of each other, without much organization.

  • By
    Set Branch Alias with Git

    Version control systems can be difficult to use, especially when you don't use a UI app. Just think about main branch or revision names: svn uses "trunk", git uses "master", and mercurial (hg) uses "tip". I need to switch between mercurial and git...

  • By
    How to Set Commit Author

    I've worn dozens of hats on a dozen different teams during my time at Mozilla, but none has been as rewarding and challenging as community management. Whether it's mentoring students, welcoming new contributors, or reviewing pull requests, there's always so much to be done. There's also...

  • By
    Git Checkout at Previous Timeframe

    In the past I've blogged about checking out branches created on a specific date as well as sorting git branches by date, but one frequent usage of git and dates is checking out a commit at a given time in the past.

  • By
    Create gists from Command Line

    One of the best ways to gain contributors for your open source project is by providing a rough patch for the contributor to start from.  One of the best ways to ask for help is by providing what you have so far and letting a mentor...