<commit_before>
### Exercise 2: untracked -> staged (and undo)

* view _status_ and confirm that all files are currently untracked:

    <details><summary>Hint for this step:</summary>
    <p><pre>
    git status
    </pre></p></details>
<br/>

* _stage_ the `src` folder and `build.gradle` file by adding to the index: 

    <details><summary>Hint for this step:</summary>
    <p><pre>
    git add src build.gradle 
    </pre></p></details>
<br/>

* view _status_, confirm files are staged:
    <details><summary>Hint for this step:</summary>
    <p><pre>
    git status
    </pre></p></details>
<br/>

* _commit_ the files which are currently staged:
    <details><summary>Hint for this step:</summary>
    <p><pre>
    git commit -m "first commit"
    </pre></p></details>
<br/>

* view _status_:
    <details><summary>Hint for this step:</summary>
    <p><pre>
    git status
    </pre></p></details>
<br/>
<commit_msg>incremental change as part of a larger frenzy of activity<commit_after>
### Scenario

* `User.java` is untracked. We'll stage it and then undo.

### Exercise 2: untracked -> staged (and undo)

* Stage `User.java` by _adding_ to the index:

<details><summary>Hint for this step:</summary>
<p><pre>
git add src/**/User.java
</pre></p></details>
<br/>

* view _status_, confirm files are staged:

<details><summary>Hint for this step:</summary>
<p><pre>
git status
</pre></p></details>
<br/>

* **Plot-twist**: requirements have changed! We no longer want `User.java` in the repo: remove from the index: 

<details><summary>Hint for this step:</summary>
<p><pre>
git rm --cached src/**/User.java
</pre></p></details>
<br/>

* view _status_, confirm files are staged:

<details><summary>Hint for this step:</summary>
<p><pre>
git status
</pre></p></details>
<br/>

That's it! [Next exercise](./egg_02_basic_states.md)

{'fraction_non_alphanumeric': 0.17038649972781708, 'fraction_numerical': 0.002177463255307567, 'mean_word_length': 3.81151832460733, 'pattern_counts': {'":': 0, '<': 84, '<?xml version=': 0, '>': 86, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2811904', 'n_tokens_mistral': 633, 'n_tokens_neox': 604, 'n_words': 198}