Skip to Main Content






Git Basics

Exercise 10: Writing Commit Messages

  • Objective: Practice writing meaningful commit messages.

  • Exercise:

    • Create a new file and add content.
    • Write a commit message that clearly describes the changes:

      git add newfile.txt
      git commit -m "________"

  • Hint: The commit message should be clear and concise, like "Add initial version of newfile.txt".

  • Answer:

    • The commit message could be: Add initial version of newfile.txt

Exercise 11: Fill in the Blanks

  • Objective: Fill in the blanks to follow best practices in Git.

  • Exercise:

    git checkout -b ____-branch
    git commit -m "____ changes in feature-branch"
    git ____ origin feature-branch

  • Answers:

    • Line 1: feature
    • Line 2: Describe the specific
    • Line 3: push