Getting a New Remote Git Branch–#SQLNewBlogger

I was notified of a new PR at DataSaturdays, and I went to look at the changes. In this case, a lot of styling items in the code, which I can’t quite picture. I also wanted to check the behavior of some sorting changes. How could I do this?

I saw the branch, but I wasn’t sure how to get it locally. For me, I started with Google, which too me to StackOverflow. Here I found an answer.

I have git v2.29, so I could probably have used just the checkout command, but I ended up doing this command:

git fetch

which got me the new branch.

2021-01-05 10_27_18-cmd

From here, I did a checkout of this branch, tested the code, and then could approve the PR.

I know I’ve likely had to get a branch before, but I am hoping that writing this post will help me remember.

SQLNewBlogger

This is a skill that is handy for working with code, and these days, even infrastructure and management. Git is an important skill, so showcase some things you learned, how, and why, on your blog.

This post took me about 6 minutes to write.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.