![]() ![]() The gift of lightweight branch creation and branch deletion is one of the primary benefits developers enjoy when they switch from traditional version control systems to Git. To list branches, just use the -a or –all options: git branch -aĪnd to find out which branch you are currently on, a quick git status command will fit the bill: git status Proper development housekeeping means you should prune your workspace from time to time and delete Git branches that are no longer needed. ![]() The following command creates a new Git branch off the commit with id 4596115: git branch devo-branch 459615 Git branch listingsįrom time to time, it’s a good idea to take stock of all the Git branches you have created. ![]() To do so, use the branch switch and provide the commit id after branch name. Similarly, a developer can create a new Git branch from a commit. The following command will create a new Git branch off the M1 tag named charlie-branch: git branch charlie-branch M1 Create a Git branch from a commit To do that, simply use the git branch switch and provide the tag name after the new of the new branch to create. Sometimes a developer wants to create a branch from a commit that has been tagged as milestone or release. How to create Git branches from commits, tags and even the current branch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |