1.
The
git branch <name>
command creates a new branch with the given name. When creating a branch, you should give it a short but descriptive name (e.g. FixTypoInReadme). Note: name may not have spaces, so you can use - (dashes) or CammelCaseText to divide words in your branch names. Remember not to include the < > when writing your own command.(a)
git branch fixTypoInName
- Correct!
git branch <fixTypoInName>
- The command should not contain < >.
branch fixTypoInName
- The command is missing
git
. git fixTypoInName
- The command is missing
branch
.
If you want to create a new feature branch named fixTypoInName, which command should you use?
Hint.
Look back at the format of the command in the previous description.
(b)
- No output was provided.
- Correct!
- It said the branch was created.
- Look at the terminal window again.
- It gave an error statement.
- Your branch was not created. Make sure your branch name does not contain spaces and < >
- The current branch is <branch name>.
- Look at the terminal window again.
Adapt the command from Task 3.2.1.a to create a branch for the issue you claimed. Type that command now.
What output was produced when you typed the
git branch
command?Hint.
Look back at the format of the command and make sure you type it correctly.