Shell Tutorials

  • By
    How to Install a NPM Module from GitHub Branch

    In my journey to work more quickly with a project containing loads of dependencies, I've come across a few techniques I've not needed to use before. I previously wrote about How to Push to a Git Remote Branch of a Different Name -- this...

  • By
    Open a Browser Tab with DevTools Open by Default

    Using command line flags is a great way to subtly improve productivity. Whether saving yourself keystrokes or enabling specific features, it's very much worth knowing the application flags available to you.To launch a new tab with DevTools in Chrome, you can use the --auto-open-devtools-for-tabs command...

  • By
    git: Remove Untracked Files

    I've always said that I know just enough about git to get the job done, but also do something destructive. Nothing embodies that more than my recent mistake. I somehow found a git repository full of untracked files and git stash wouldn't fix it.

  • By
    Detect Changed Files with git

    There are numerous reasons to want to know which files have been added or modified in a git repository, one of which is your text editor highlighting those files. Another use case is running tasks against only files which are presently changed, like lint or...

  • By
    How to Detect the Default Branch in a git Repository

    Over the past few years, many engineering teams have switched their default git branch name from master to a different, potentially less offensive term. I'm all for choosing to name your default branch whatever you'd like, but not having a universal default branch name can...

  • 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
    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
    How to Specify User Agent with cURL

    Over the years I've shared how to perform a number of actions with cURL: how to send POST data, how to retrieve headers, follow redirects, check GZIP encoding, and more. Another useful cURL directive is sending the user agent, as some...

  • By
    View Mac Calendar from Command Line

    As someone that loves using UI tools, I do pride myself in learning how to accomplish the same feats from command line. Don't believe me? Check out my Command Line tutorials section -- I guarantee you'll learn quite a bit. Recently I learned that you...

  • By
    Git Branch Autocompletion

    Naming git branches is something most of us have down to a science. My branch naming pattern is usually {issue number}-short-feature-description, though many developers prefer to lead with the description and end with the issue.Regardless of the pattern you use, having a feature like autocomplete...