Category: Blog

  • Setting Up GitHub Desktop (formerly GitHub for Windows)

    When I started using Git, I first download GitHub for Windows.

    I went searching, and instead found GitHub Desktop, which is the new client from GitHub for working with Git. This replaces GitHub for Windows, and gives a unified experience across Windows and MacOS. I hope it also works better, as I found the GitHub for Windows software to be quite flaky. I abandoned it early and moved to SourceTree and GitFrakken ( I couldn’t decide).

    I downloaded the installed and when I clicked the file, the install ran, with no other actions from me. No UAC, no picking files, not EULA, no crazy installer. It just runs. Good and bad, but overall, this is likely a few MB, and I like this.

    Installer Notification

    When this gets done, I get asked to sign into GitHub. I can skip this, and likely use this as a local git manager, but since I have a GitHub account, I’ll do that. Signing up is easy, it’s free, and since lots of people use GitHub, just sign up.

    GitHub Desktop Welcome Screen

    Once I sign up, I need to approve permissions. I’m always wary of this, and I think that I should really understand what this means, but for most things, this is fine. If I lose control of my local machine, I have bigger issues.

    Authorize GitHub Desktop

    I do have to authenticate, which I think is important. I have two factor set up, which ensures that you can’t just link to my repos and guess my password.

    Enter GitHub Password

    Once this completes, I get asked to allow my browser to open the app. I agree, and I see a get started view, with my online repos listed.

    GitHub Desktop Get Started Screen

    Trying Out the Interface

    I decided to see how well this works, to see if this is more stable. With that in mind, let’s drop an existing repo folder onto the client. I have a git repo that isn’t in GitHub yet, so let’s drag that folder and drop it on the “Pro Tip” section in the lower right (see the image above).

    When I do that, I get a pop up.

    2020-05-26 18_25_49-Window

    This is the path of the repo. I click “Add”, and it’s added. This becomes my current working repo, and I can see a somewhat standard view of my repo that I see in SourceTree or GitKrakken or any client.

    2020-05-26 18_26_58-Window

    As you might expect, this is geared towards publishing to GitHub. I have a “publish to GitHub” link. I also have a link to open VS Code.

    If I click the “History” tab, I see my commit of this repo on the left, the files in the middle, and file contents on the right. Standard stuff, but a nice layout.

    2020-05-26 18_28_42-Window

    I wonder what happens if I drop a local repo on here that’s in GitHub? Let’s try that.

    The “Getting Started” screen isn’t listed, and I can’t close the repo. At least, I don’t see a close menu item. If I restart the app, I come back to my main repo screen. Let’s try using the “Add repository” menu item. This gives me the same type of dialog I got from a drag and drop repo.

    I can cancel that and just drop another repo folder onto the app, and I get the same dialog as well. So drag/drop seems to always work. When I look at history for an older repo, I see lots of commits. No graph, but all the commits and dates.

    History of older repo

    This repo always has a remote at GitHub, so I see the “Open the repository” link on the “Changes” tab.

    Main repo page with open on GitHub link

    If I make a few changes in this repo, in a few seconds I see the changes reflected on the main page. I deleted two files and edited another. The right side of the filename has a hyphen for a delete and a circle for a chance.

    List of Current changes

    I committed two changes and that left the third. I don’t see a stage/unstage option here. If I right click the file, I do see a few options. This is likely good enough for me that I can discard the changes. However, the “ignore” feature is nice, as well as the add all of this type option.

    2020-05-26 18_38_20-Window

    Opening this in VS Code, Explorer, or a default program is a nice touch as well.

    Options

    There some interesting options in the tool. I’ll cover a few things I found to be nice items. First, I like that the branch menu has some things beyond the “new branch” and compare. I can merge, or rebase. Those are good things to have in this tool and common tasks.

    Branch menu items

    The Repository menu is what you’d expect, but the “Create issue on GitHub” is really nice. I submit quite a few of those to keep track of work, so it’s nice to be able to get there quickly from here.

    2020-05-26 18_40_35-Window

    Under File – Options, there are some good, handy things that much software has these days, but much also doesn’t. For Integrations, the app detected I have Sublime Text installed, so I can use that instead of VS Code. I assume notepad++ or other editors might appear here.

    Integration Options

    The Appearance option has a light and dark theme. Important to a lot of people, though I’d like the ability to easily modify things here. I find that these pre-defined themes are sometimes hard for me to see. I’d like to alter the colors slightly in many of them, especially as I get older.

    2020-05-26 18_41_05-Window

    I like that the Advanced menu lets me choose to get rid of some confirmation dialogs. Overall, I like these, but they do get annoying for some things.I also get a basic default of what to do with changed files when I switch branches. Since I sometimes do this without thinking, it’s a nice feature.

    2020-05-26 18_40_59-Window

    Impressions

    So far my initial impressions are positive, but I need to use this for a bit as my main git tool to see if it works well. I enjoyed GitHub for Windows as well, but I kept having it break with certain changes I’d make, which forced me to learn the command line to fix my repos.

    This is a much simpler app, and it provides the basic git functions I mostly need. Time will tell if this feels intuitive, but I like the simple nature and the ability to quickly navigate back to a file in Explorer or VS Code. I don’t know if I need that, since often I have an IDE open when I’m working with files, so I’ll experiment and see how well this works.

  • Daily Coping 29 May 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is today link your decisions and choices to your purpose in life.

    What’s my purpose in life. I think it’s to be a great partner, help others where I can, and improve my skills in (and outside) of my career for myself. Maybe a bit selfish, but those are what I think.

    For the most part, these things drive my life. I work to have a strong marriage, and often give as much as I can for my wife. One of the reason’s I’ve continued to work with SQLServerCentral and Redgate is that this supports my wife in her self employment. Rather than try to be more like a Brent Ozar, whose had amazing success in his career field, I’d rather do the things that provide stability.

    I do enjoy those things, so it’s not a great sacrifice.

    My mission at SQLServerCentral has always been to help others be better at their jobs. I think about that often as I work through the management of the site. It’s a guiding principle for me, and I think my decisions about the site are with this in mind. I may not always do the best job I can, and I do sometimes beat myself up about that, but I am to help others.

    That’s also a part of why I coach. It’s a way to give back and help others grow up. I may do more volunteering, especially if my schedule continues to be strictly at home, since I do believe in giving back to the world.

    Lastly, I continue to work on improving myself. I exercise and try to take care of my body. I practice guitar. I try different things in the kitchen. I work on different projects around the house, and I’m trying to do a bit more woodworking. None of these things pay a bill or do more than satisfy my soul, but that’s a part of my purpose.

  • Custom Quarantine PoSh Prompt

    Since I’ve been quarantined at home and working in my office, every day is the same. I can’t go to the gym, or coach, or go to the restaurant, or much of anything. As a result, I regularly, forget what day it is.

    Yes, it’s on my phone, but that’s not always open and visible. It’s on my watch, but I have to swing up my wrist and hope it lights up. Or reorient my wrist to see it.

    I have Rainmeter running, which is nice, and I have a summary in the upper corner of my screen, but often I have something covering this.

    2020-05-19 15_04_13-Microsoft Edge

    The time is in the toolbar, but I sometimes hide toolbars to record things. Basically, I forget what day it is and I’m looking for a few hints I can use to make this easier. As I play with PowerShell regularly, I thought it would be good to update my prompt slightly.

    Plus, it would be good PoSh practice.

    Setting a profile. I’ve seen a few posts on customizing the prompt, and they all say I need a function, called prompt, in my profile. I found this article, which gave me a good idea. Put the time in the prompt.

    I then had to figure out how to get to my profie. It turns out “notepad $PROFILE” in a PoSh prompt will get you there. If you don’t have a profile, you’ll see this:

    2020-05-19 14_55_12-Notepad

    Say yes, and then add some code. I had to look up the Format options and experiment a bit to decide how I wanted things to look.

    function prompt {
            $lastResult = Invoke-Expression '$?'
            if (!$lastResult) {
                    Write-Host "Last command exited with error status." -ForegroundColor Red
            }
            Write-Output "${msg}$(
                    # Show time as 12:05PM and day of week
                    Get-Date -Format "dddd HH:mm"
                    # Show current directory
            ) $(Get-Location)> " 
    }

    I saved this and now when I get a new PoSh prompt, I get this:

    2020-05-19 15_01_53-PoSh

    Now I easily know the day and time when I’m working in a PowerShell terminal. This also shows up in my Visual Studio Code terminal as well, since that’s just a PoSh environment.

    SQLNewBlogger

    This was a quick thing I did in about 5 minutes to customize my environment, and help me be more productive. A happy employee works smoother.

    I decided to show off how I did this and spend a quick 10 minutes writing down and documenting what I did.

  • Daily Coping 28 May 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to recall three things you’ve done that you are really proud of.

    The Snowboarding Investment

    I started snowboarding before I had kids. I got pretty good, and I’ve enjoyed going fast, avoiding breaks, and making the most of the time I have on the slopes. As my kids grew up, we started all of them on skis, and in ski school. Expensive, but it allowed them to learn from someone that wasn’t a parent and it allowed my and my wife to continue to enjoy ourselves. As they learned, we enjoyed them learning to keep up with us.

    For my younger two, they wanted to start snowboarding relatively quickly after learning to keep up with us adults on skis. Rather than do more ski school, I took the time to work each each of them. My son was older, 11 or 12, when he wanted to switch, but taking days to teach him meant I was really on the beginner slopes with him, not having a fun day.

    407428_3246577052191_1422307751_n

    It took the 4-5 days at the end of one season and 2-3 at the beginning of the next to get him to the point where we could progress to a continuous run down Keystone or Copper mountain.

    My daughter started younger, which was harder. She was barely on skis when she say her brother snowboarding and wanted to try.

    10391628_1266488471214_3245615_n

    This was many more days, often family days where I would spend half the day walking alongside her, or holding her balanced and helping her learn how to move down the slopes.

    I had to put aside fun times to invest in them. It’s paid dividends over the years, and I’ve had great times with them on the slopes. I’m really proud of spending the time to teach them and then watching them grow and learn to love sliding down the mountain.

    Ranch Improvements

    We moved to a horse ranch about 15 years ago, and my wife started full time teaching about 10 years ago. As she’s tried to experiment with her skills as a horse whisperer, she’s asked me to help build things to help her better care for horses.

    She gave me the challenge of building slow feeders years ago, and I spent some trying different designs and building her feeders that work well for her purposes. Here is one of the early designs. Hint, plywood doesn’t work well over time.

    1097896_10201736507843332_1419379804_o 

    Some have now been in service over a decade, and I’ve built quite a few more. We have 13 in use and 2 spares now. Recently, she also got the idea that she wanted a horse back scratcher, so I figured out how to do this.

    92938268_10221411947757033_154728138163617792_n

    SQLServerCentral

    It wasn’t my idea. Credit goes to Brian Knight for the idea and helping bring the founders together. Over the years, a lot of the site has grown and evolved because of me. I was the founder that was able to work for the company full time, I started the editorials, and I’ve been the face of the site for many years.

    I remember crossing 1 million posts, 1 million subscribers, publishing books and a magazine, hosting parties at the PASS Summit, and getting the chance to meet many of you in person over the years have been highlights.

    Hearing many of you tell me that the site has helped you in your career, has solved a problem, or inspired you in some way are immensely gratifying to me. I can’t tell you how much I’ve appreciated the kind words and comments from many people over the years.

    I’m grateful to Redgate for allowing me to continue to steward the site as the Editor in Chief, and this has been one of the things I’m most proud of in my career.