1.
The first step is to delete the feature branch from your local repository. This exercise will walk you through that process.
(a)
git switch
- The
git switch
command is used to change the active branch. git pull
- The
git pull
command is used to pull changes from a remote repository to your local repository. git commit
- The
git commit
command is used to commit staged changes to the repository. git branch
- Correct! The
git branch
command is used to display all of branches in your local repository.
It is not possible to delete the active branch. So, if you have not already, switch from your feature branch to the
main
branch. Then give a command that lists all of the branches in your local repository.Which command did you type to list the local branches?
Hint.
Refer back to the section on switching branches Section 3.3
(b)
- It has an * next to it.
- It appears in green.
- It appears in bold.
- It appears in italics.
- It is not possible to tell the active branch based upon the output provided.
From the output provided by Task 4.6.1.a how do you know which is the active branch?
Hint.
Refer back to the section on switching branches Section 3.3
(c)
The command
git branch -D <branch>
will delete a branch from your local repository. Use the this command to delete your feature branch.(d)
How can you check if your branch was deleted? Be sure to check that it was deleted. If not return to Task 4.6.1.b and try again.