# Exercises

### Exercise 1 - Choosing a Commit Message:

Which of the following commit messages would be most appropriate for the last commit made to git.txt?

1. “Changes”
2. “Added line ‘Torvalds said "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'.""
3. “how git was named--citation from Torvalds”

### Exercise 2 - Committing to Git

Which command(s) below would save the changes of myfile.txt to my local Git repository?

1. `git commit -m "my recent changes"`
2. ```
   git init myfile.txt
   git commit -m "my recent changes"
   ```
3. ```
   git add myfile.txt
   git commit -m "my recent changes"
   ```
4. ```
   git commit -m myfile.txt "my recent changes"
   ```

### Exercise 3 - Committing Multiple Files <a href="#firstheading" id="firstheading"></a>

The staging area can hold changes from any number of files that you want to commit as a single snapshot.

1. Add some text to git.txt noting your decision to consider use git to help your work
2. Create a new file I\_love\_git.txt with your initial thoughts about git
3. Add changes from both files to the staging area, and commit those changes.

### Exercise 4

bio Repository

* Create a new Git repository on your computer called bio.
* Write a two-line biography for yourself in a file called me.txt, commit your changes
* Modify one line, add a third line
* Display the differences between its updated state and its original state


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://igb.mit.edu/mini-courses/version-control-with-git/tracking-changes/exercises.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
