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

Development Tools

On the command line, what is the difference between the -D and -d flags? Or are they the same?

At 5:29 in the video "Branches Behind the Scenes" (the last video of the "Branches" section of the "Git Branches and Merging" course) the instructor explicitly says "capital D" when writing out and reading the command for deleting a branch, but he has been using lowercase d ever since. Is there a difference between capital and lowercase for the delete option?

1 Answer

I searched the Internet and found:

Delete a Local GIT branch

The -d option stands for --delete , which would delete the local branch, only if you have already pushed and merged it with your remote branches. The -D option stands for --delete --force , which deletes the branch regardless of its push and merge status, so be careful using this one!