Git Assessement Step-by-Step Question

Learning Challenge

Git Assessment

Question

In the Assessment, the directions say to create a new branch called “drawings”. Then it says to checkout out that branch. Do I have to do each separate command or can combine commands?

What I’ve tried

Instead of creating the branch “drawings” and then checking out, I just used command “git checkout -b drawings”

Screenshots

It’s a legitimate command and it accomplishes what is being asked of you. It’s a shortcut that works!

2 Likes

Definitely! As @aprilclove said, it’s a great shortcut.

I think the reason we don’t do that in that specific curriculum is for those who are starting out in git it can be a bit confusing as a “shortcut.” It makes it a bit more explicit when you call out each step for a beginner to learn the two steps. It can help students understand that you can create branches. As well as check out individual branches.

Once you have those two concepts down, most developers tend to “create and checkout” into one command.

Great question! :+1:

1 Like