Creating and applying patches

Report a typo

In this repository, a file named config.txt was created with the following contents:

  • option1=true

  • option2=false

Your task is to:

  • Append a new configuration option: option3=enabled

  • Create a patch file (change.patch) that captures the difference using git diff

  • Revert the file to its original state (remove option3=enabled)

  • Apply the patch using git apply so that config.txt ends up with all three options.

Write your Git command(s) below line by line.

Write a program
# Write your Git command(s) below line by line

Create a free account to access the full topic