Git

Articles and resources in the Git category. A full list of categories is also available.

  1. A handy Git shortcut to fetch and prune

    Article posted 8th July 2020 in Development and Git

    I’m still writing my Git commands long-hand. Turns out a fetch and prune can be more concise than I’ve previously suggested, all without aliases.

  2. Chaining Git commands

    Article posted 7th July 2020 in Development and Git

    Writing a sequence of Git commands is really handy and much quicker than running one, waiting for it to finish, writing the next, etc. Here’s how.

  3. Pushing to a differently named branch on your remote

    Article posted 29th June 2020 in Development and Git

    When using Git, you’ll normally push work to an identically named branch on your remote, but what if you want to push to a different branch?

  4. Keeping git status short

    Article posted 22nd June 2020 in Development and Git

    git status is one of the Git commands I use the most, but I’ve always thought that it overshares. Well, I’ve found a way to make it more readable!

  5. Why I always raise a pull request on solo projects

    Article posted 4th May 2020 in Development and Git

    The whole point of a PR is to get feedback and approval on a piece of work from someone else before it’s published. But what if it’s just you?

  6. How to rename a remote repo in Git

    Article posted 10th February 2020 in Development and Git

    Renaming a Git repository feels pretty fundamental – surely something will break? Well, worry no more – it turns out it’s a piece of cake!

  7. How to diff branches in Git

    Article posted 11th January 2020 in Development and Git

    Turns out it’s pretty easy to look at the differences between two branches in Git. This is useful when coming back to a feature branch after a while.

  8. Git rebase versus merge

    Article posted 31st December 2019 in Development and Git

    There are two ways to get a branch up to date with master before raising a PR: merge and rebase. Here are pros and cons with each.

  9. Version tagging with Releases in GitHub Flow

    Article posted 27th December 2019 in Development and Git

    I’ve started using GitHub Flow for some projects and the process is much simpler than GitFlow, but one hurdle I encountered was tagging.

  10. Simplifying branching and deployment with GitHub Flow

    Article posted 14th December 2019 in Development and Git

    GitFlow is great but it’s not quite right for every project. GitHub Flow is simpler and means I’ll publish a feature or fix as soon as it’s ready.

  11. Adding files for a commit with asterisks

    Article posted 1st October 2019 in Development and Git

    It can be fiddly to stage files for a commit using Git on the command line. Or so I thought! I found a shortcut, so thought I’d write about it.

  12. Why I’m not using Git aliases

    Article posted 11th September 2019 in Development and Git

    Git aliases are incredibly useful, but there are five good reasons I’ve decided not to make use of them.

  13. Version control for articles and blog posts

    Article posted 6th September 2019 in Development and Git

    Git workflows like GitFlow are great, but how does publishing articles fit in when using a static site generator? Here’s how I’m doing it.

  14. Changing editor for Git on the command line

    Article posted 21st August 2019 in Development and Git

    Something that has been bugging me since moving from a GUI to command line git has been the default editor for writing commit messages.

  15. Fixing your last Git commit

    Article posted 21st August 2019 in Development and Git

    Since I’ve started using Git on the command line, there’s one ‘new’ thing that I’ve used more than any other: amending my most recent commit.

  16. Changing your Git history

    Article posted 26th July 2019 in Development and Git

    This week I removed some files and data from my Git history. It was a bit of a learning curve, but here’s how I did it, step by step.

  17. Getting to grips with Git

    Article posted 26th June 2019 in Development and Git

    I’ve been using Git for years and it’s finally time to make a concerted effort to move away from my GUI to the command line.