Clean Up
Part of the Version Control section of Coddy's Terminal journey. Lesson 55 of 58.
The feature is merged. The branch served its purpose and can be deleted to keep the branch list short.
Once you are confident the merge worked, delete the branch with the safe -d flag (Git checks that the work is already merged before allowing the delete).
Challenge
BeginnerDelete the add-task branch and list the remaining branches.
Every run starts from a fresh copy of the folder, and the whole script in the editor runs again from the top. Nothing is committed for you: the editor starts with the commands of the previous steps (
git init -q -b main, thegit configlines and the commits so far). Keep those lines in the editor. If you clear them you will seefatal: not a git repository.
Try it yourself
git init -q -b main
git config user.name "Todo Dev"
git config user.email "todo@coddy.tech"
git add .
git commit -q -m "Seed todo list"
git switch -q -c add-task
echo "walk the dog" >> todo.txt
git add todo.txt
git commit -q -m "Add walk task"
git switch -q main
echo "This is the project readme." >> readme.md
git add readme.md
git commit -q -m "Expand readme"
git merge -q -m "Merge add-task" add-task
# Your commands below
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Version Control
2Getting Started
Initialize A RepositoryThe .git FolderConfigure Your IdentityGit StatusRecap - First Repo8Merging
What Is A MergeFast-Forward MergeThree-Way MergeMerge ConflictsResolve A ConflictRecap - Merge Master11Feature Branch Project
Project OverviewInitialize Main3Tracking Changes
The Staging AreaGit AddGit CommitModifying A Tracked FileGit LogRecap - First Commits6Recipe Site Project
Project OverviewInitialize And IgnorePractice on your own: Terminal playground