Perform the following steps to manage your local branches:
- Whenever you start working on a bug fix or a new feature in your project, you should create a branch. You can do so using the following code:
$ git branch newBugFix $ git branch * master newBugFix
- The newBugFix branch points to the current HEAD you were on at the time of the creation. You can see the HEAD with git log -1:
$ git log -1 newBugFix --format=format:%H 25fe20b2dbb20cac8aa43c5ad64494ef8ea64ffc
- If you want to add a description to the branch, you can do this with the --edit-description option for the git branch command:
$ git branch --edit-description newBugFix
- The previous command will open an editor where you can type in a description:
Refactoring ...