Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

codingchewie
codingchewie
8,764 Points

Clarity on Git -b from Git Basics

Learning to use Git in the terminal and while taking the course, Git Basics, I noticed in the Challenge Task 5 that there was a question:

Use the trick we learned in the previous video to create a branch named another_new_feature AND switch to it, all in one command.

and the answer is git checkout -b another_new_feature

To clarify, the -b is a shorthand to branch? So in the future instead of writing out git branch foobar could I just use the shorthand approach of git -b foobar?

Also, is there a good reference to study for all shorthand commands?

1 Answer