Dillion Megida 10/5/2021

The minus (-) option in Git, an alias for the previous branch

Read Original

This article details the Git feature where the minus sign (-) acts as an alias for @{-1}, representing the last branch you were on. It explains the branch stack concept, demonstrates usage in commands like checkout and merge, and notes a limitation with the branch delete command. It's a practical tip for developers to navigate Git branches more efficiently.

The minus (-) option in Git, an alias for the previous branch

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week