But before deleting the existing branch, switch to the other branch. Switched to a new branch src]$ git branchĪ branch can be deleted by providing –D option with git branch command. Git provides –b option with the checkout command this operation creates a new branch and immediately switches to the new src]$ git checkout -b test_branch In the above example, we have used two commands to create and switch branches, respectively. Jerry uses the git checkout command to switch between src]$ git checkout new_branch The pictorial representation of create branch operation is shown below − Switch between Branches Git shows an asterisk mark before currently checked out branch. If any specific commit ID is not provided, then the branch will be created with HEAD as its starting src]$ git branch src]$ git branchĪ new branch is created Tom used the git branch command to list the available branches. We can use a specific commit or tag as the starting point. We can create a new branch from an existing one. Tom creates a new branch using the git branch command. For example, we released a product for 6.0 version and we might want to create a branch so that the development of 7.0 features can be kept separate from 6.0 bug fixes. We can use this operation to fork off the development process into two different directions. Branch operation allows creating another line of development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |