Posts

  • Oh My Posh

    As a terminal junky, many years ago I customized my PowerShell $profile to define a custom function:prompt. This included custom parsing for any .git directory (even .hg for Mecurial!), and eventually any .git file to support worktrees and submodules. It was fast and, last I knew, still powered some internal environments we use at work.

  • On Mastodon

    While I haven’t yet left Twitter, I’ve joined many in the #TwitterMigration to Mastodon or, more specifically, Fosstodon. While I appreciate it’s a federated network of nodes - much like IRC of old - I am slightly disappointed I either deleted or let lapse my old mastodon.social account I opened many years ago when it first started going public. Being on that instance is like a badge of honor, but a pointless digital badge, so 🤷‍♂️.

  • Reduce fetch and checkout times in git

    Some repos can be huge, like Azure/azure-sdk-for-net (at the time this was written) due to a number of factors, like history, old binaries, or other large files. A repo could also have a relatively small history but a huge amount of files that take a very long time to check out. You can both reduce the time it takes to fetch such a repo and how long it takes to check out files.

  • git sync any branch

    Sometime ago I blogged about git sync, an alias I created to concisely pull the upstream repo’s main branch, push that branch to my origin fork, and fetch origin branches to determine which branches have been deleted - likely from merged pull requests. As many repos I work in have changed from master to main, not all of them have yet. Some also use trunk which, personally, I like better but is less common than main.

  • Table formatting in GitHub CLI 2.0

    Use table formatting functions in template to get the same great table output as with built-in GitHub CLI commands.

  • Add aliases to GitHub CLI from stdin

    Add multiline aliases or aliases with mixed quotes easily with gh version 1.10.

  • gh user

    How to define a GitHub CLI alias to query users who can be assigned issues within the current repository.

  • Configure Multiple Clocks

    One of the great aspects of working for a large global company like Microsoft is working with a lot of diverse people. Working across time zones has its difficulties, though. I know that India is about 12 hours ahead of us, but with different observed timezone offsets it’s difficult to remember exactly. For a recent project I started working on, I also work with a lot of people in or around Cairo, Egypt.

  • Debugging tests in Linux containers with Visual Studio

    Some recent tests failures for the Azure Key Vault Certificates client libraries for .NET required debugging on Linux, and while I frequently use WSL2 (even to write this post), I needed a fresh Ubuntu 18.04 image similar to our live testing agents. Fortunately, recent versions of Visual Studio 2019 have included the component “.NET Core Debugging with WSL 2”.

  • Getting back to a good state in Git

    I was helping a colleague the other day after they merged the master branch into their older topic branch, which brought along a lot of other commits and made the pull request on GitHub huge - too many files to even review in full on GitHub or in Visual Studio Code. I commented that instead, rebasing onto master (or whatever branch you want to merge) is cleaner. First, however, you have to get back to a good state.

subscribe via RSS