Warning
The below commands are intended for people who understand git usage. Please do not run them if you are not really familiar with what is going on.
- Run below command to restart git
rm -rf .git
git init-
Change
madlibs.txt, by filling in Author section. -
After your changes, add you
madlibs.txtto git.
git add madlibs.txt
git status- After staging your changes, commit your changes.
git commit -m 'initial commit'
git status- Checkout your current git commits.
git status
git log-
Change your file again, this time filling in parentheses.
-
Stage, then commit.
git add madlibs.txt
git commit -m 'Updated text in madlibs.txt'- Checkout your last commit.
git log
git checkout [commit hash]- Get back to your main branch.
git checkout main- Create new branch.
git branch change_noun
git checkout change_noun-
Change a critical noun in your madlibs.txt.
-
Stage, commit, and return to main branch.
git add madlibs.txt
git commit -m 'Changed noun [A] to [B]'
git checkout main- Repeat step 1-3. Change the same noun you did last time but to another one.
git branch change_another_noun
git checkout change_another_noun
# Update your file.
git add madlibs.txt
git commit -m 'Changed noun [A] to [C]'
git checkout main- Merge your first branch to main.
git merge change_noun- Merge your second branch to main.
git merge change_another_noun- Resolve conflicts, stage and commit.
git status
# correct conflict
git add madlibs.txt
git commit