Stash, Fix, and Resume
Initial State
You are in the ~/project
directory. The time-machine
directory is a new Git repository with the following files:
main-console.txt
(content: "Bug: Temporal Flux Unstable")
flux-capacitor.txt
(content: "Work in progress")
new-feature.txt
(content: "Untracked feature")
You can use the git status
command to check the current status of the repository.
Tasks
- Stash your current changes, including any untracked files.
- Fix the "critical bug" in the
master
branch by updating the content of main-console.txt
to "Fixed: Temporal Flux Stabilized".
- Create a new branch from your stashed changes, named
future-upgrades
.
- Ensure the bug fix from the master branch is also present in the
future-upgrades
branch.
Requirements
- All operations must be performed in the
~/project/time-machine
directory.
- Ensure your original changes (both tracked and untracked) are present in the new branch.
- The bug fix in
main-console.txt
must be present in both master
and future-upgrades
branches.
Example
After completing the challenge, your repository should look like this:
On the master
branch:
main-console.txt (content: "Fixed: Temporal Flux Stabilized")
On the future-upgrades
branch:
main-console.txt (content: "Fixed: Temporal Flux Stabilized") ## Contains the bug fix from master
flux-capacitor.txt (content: "Work in progress") ## Original tracked changes
new-feature.txt (content: "Untracked feature") ## Original untracked file
Note: To achieve this state, you'll need to ensure that both branches contain the bug fix while preserving your work-in-progress changes in the future-upgrades branch.