Category: Blog

  • Vacation After Time Travel

    It’s Wednesday. However, it feels like Tuesday. I left Denver about 25 hours ago to fly to LA and then Sydney. It feels like one day, but by crossing the international date line, I lost a day.

    Don’t worry, I’ll get it back when I come home in a couple weeks.

    Today starts vacation for my wife and I. We’ll enjoy some time in Sydney and Brisbane before I go to work next week.

    No much blogging until then, apart from a new word Friday Winking smile

  • Flying Halfway Around the World to Australia

    I leave tonight for Australia. I was in London 3 days ago, so this will complete my halfway around the world trip when I time travel tomorrow and skip Tuesday. I’ll arrive in Sydney on Wednesday morning.

    I am very lucky and I appreciate the chance to go back down under for work. I have a few seminars I’d delivering with fellow Redgaters, MVPs, industry experts, and Octopus Deploy engineers. I’ll be busy these days:

    That’s next week, but I’m heading down early to recharge a bit. My wife is traveling with me to Sydney, where we’ll spend a few days later this week. She’s never been to that city, and I have literally been there for about 53 hours. We’re looking forward to some sightseeing, hiking around, and enjoying the Australian hospitality.

    We’ll also take a few days in Brisbane before I go to work, checking out the Gold Coast and seeing a few friends. I’m looking forward to going back, as I enjoyed 4 days there before the pandemic.

    This should be a good break from work before a busy week. I’ll be lightly blogging a few things, but mostly enjoying this break on the other side of the world.

  • A New Word: Apolytus

    apolytus– n. the moment you realize you are changing as a person, finally outgrowing your old problems like a reptile shedding its skin, already able to twist back around and chuckle at this weirdly antiquated caricature of yourself that will soon come off completely.

    I don’t know if I am changing that much, though hopefully I’m still maturing a bit. More, I think about my daughter, who graduates college this year. She’s changed so much in the five years since she left home for college, outgrowing the problems and concerns she had as an 18-year old.

    I think I went through that myself, leaving home at 17 for college, coming back 4 years later a completely different person, viewing the world completely differently.

    From the Dictionary of Obscure Sorrows

  • Using Git Prune–#SQLNewBlogger

    As I’ve been working with SQL Saturday and managing changes to events, I’ve accumulated a lot of branches. Even though I’m a solo developer, I decided to use branches, as I expect others to share this load in the future. This post looks at how to start cleaning those up.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. You can see all posts on Git as well.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    Finding Old Branches

    When I ran the git branch command, I saw this. There are a lot of old branches in there.

    2024-04-11 10_44_53-cmd

    I decided that I should reduce this number. After all, even removing stale branches means I have a lot of events in flight.

    We use GitHub, and when I go on the site, I see lots of branches, some of which date back to last year. Those events are done, so I decided to delete some branches. In the image below, there are three branches. To the right, there are delete icons on the bottom two as I’ve already pressed the one to delete the remote branch on the top one.

    2024-04-11 10_51_00-Branches · sqlsaturday_sqlsatwebsite — Mozilla Firefox

    Now, how do I delete the local branch? Let’s start by removing it.

    Git Prune

    There is a command to remove references to remote branches that are deleted: git prune. I deleted a few older branches, and then ran git prune for remotes, with the –dry-run option. This tells me what would happen. As you can see, a number of branch references would be deleted.

    2024-04-11 10_51_57-cmd

    Nothing in here I’m worried about or that is active. I’ve deleted these on GitHub, so I’ll re-run the command without dry run. This removes the references.

    Unfortunately, the local branches still exist. We don’t remove these, as it’s possible I have work on a local branch not sent to the remote, so doing this automatically, even if I do it, is dangerous.

    I’ll do another post on removing the local branches.

    Automating the Removal of Remote references

    I might want to remove local references for branches that get deleted on the remote. This is useful if you delete branches on merge. I don’t in this case, as I’m often using the same branch for multiple changes for an event, rather than a new branch for every one.

    One way to do this is to change the config with this:

    git config remote.origin.prune true

    This will then run the prune on each fetch or full. This helps keep things cleaner, though local branches still exist. However, if I commit to a local branch and push, I’ll get an error that I need to configure the upstream. That helps with me being aware of what’s active or not.

    SQL New Blogger

    Using version control is a core skill for anyone in technology. Even database people. You could write posts on how you use or learn about git (or something else) and showcase your skills.

    This post took me about 15 minutes to write, even with screen shots.