Blog posts (page 6)

  • Advent Day 12: git log --since
    Earlier this month I mentioned how you could the visibility into git's logging with some helpful aliases. But another way to gain visibility into the commits that happened is with the --since option to git log (or git lol if you prefer). The --since option lets you narrow the history that you're viewing to - well - commits that have occurred since the date that you specify.
    Read more
  • Advent Day 11: Removing (newly) ignored files
    Yesterday I suggested that you set up a .gitignore to keep your repository tidy from temporary files, binaries and local configuration files. But what if you've already added the files?
    Read more
  • Advent Day 10: Add a .gitignore
    You need to be mindful of the files that you're putting into your repository; and, perhaps more importantly, the ones that you're keeping out of it. You don't want to check in local configuration settings for your IDE that affect the rest of your team. You don't want to check in editor temporary or swap files that will just give you pointless merge conflicts. And you definitely don't want to check in private keys or cloud provider secrets. That's why you need a .gitignore file in your repository.
    Read more
  • Advent Day 9: git lol
    There are two commands I run more than any other: first, git status which lets me know what I've been working on. Second, git log which lets me know what other people have been working on. But I don't actually use git log. Usually I run git lol instead.
    Read more
  • Advent Day 8: Git-LFS
    Distributed Version Control Systems like Git are revolutionary: they're a huge productivity gain for working with versions of source code and text files and ... a terrible pain if you want to check in large files like images, movies or audio into your repository. That's because when you clone a repository, you'll get every copy of those large binaries. The solution to this is the Git Large File Storage extension.
    Read more
  • Advent Day 7: Git Merge
    The annual Git Merge conference is one of my favorites of the year. Git developers and users get together to hack, share tips, and plan the future. Over the past five Git Merge events, we've seen a few product announcements, several talks on how to scale Git, and many talks about using Git. Unfortunately, I can't make it this year, but you can. It's coming up January 31 and February 1 in Brussels.
    Read more
  • Advent Day 6: GitKraken
    The Git command line is a tricky thing. It's useful for all of the developers some of the time, and some of the developers all of the time. But for some people, it's not always the best thing to reach for. Over the last few years, the Git GUI market has really grown. We've seen some of the first Git GUIs really mature, and we've also seen new GUI tools launch. There are a couple that I'm really fond of, and I'm excited about each of them. One of my favorite Git GUI tools is GitKraken.
    Read more
  • Advent Day 5: Review Pull Requests Locally
    Reviewing pull requests is tough work: whether you're using GitHub or Azure Repos or another hosting provider, they all try their best to give you a powerful code review experience right in the browser. But no matter how good they are, for some changes you really need to get hands-on, to run the code, to step through it in a debugger to really grok it. Thankfully, GitHub and Azure Repos both expose pull request branches so that you can just fetch them locally and work with them.
    Read more
  • Advent Day 4: 2FA and Git Credential Manager
    You're using two-factor authentication (2FA), right? Right!? This simple change can increase your security - and the security of your source code - with very little effort. When you enable it, instead of logging in with just your username and password, you'll now also need to enter a 6 digit key from an app on your phone. The problem, though, is that while 2FA works great in a website, tools like Git on the command-line don't have support for it. Thankfully, there's a tool called the Git Credential Manager.
    Read more
  • Advent Day 3: Oh Shit, Git!
    Git is... weird. If you grew up with centralized version control systems, then moving to a distributed version control system is weird enough. But Git levels that up with concepts like the "detached HEAD state", commands like "merge-subtree" and error messages like "did you run git update-server-info on the server?" So I'm very sympathetic to new users being frustrated by Git. One of the things that I've always pointed new Git users to is "Oh Shit, Git!".
    Read more