Skip to content

Commit 8e759da

Browse files
📦 day15 - updating index step by step
1 parent 39cb56b commit 8e759da

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

Day 15/README.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Day 15
2+
3+
Today we will learn to make changes step by step.
4+
5+
## Problem Statement:
6+
The index is really useful, because it allows us to be precise about which changes we want to include in each commit!
7+
8+
### Files:
9+
- hammer
10+
- bottle
11+
- sugar_cube
12+
13+
### Question:
14+
- Make changes to all three objects, to form a logical sequence of events!
15+
- Only add one of these changes!
16+
- And make a commit.
17+
- Make a second commit that only records a single change.
18+
- And a third one.
19+
20+
<div align="center">
21+
<img src="https://github.com/ArnabKumarRoy02/Learn-git/assets/86621483/6af4d455-181b-4adf-bbc8-4c88cf10012f" width=400>
22+
<p>Diagram of the problem</p>
23+
</div>
24+
25+
## Solution:
26+
27+
1. Make changes in all the three files and save it.
28+
```bash
29+
nvim hammer bottle sugar_cube
30+
```
31+
32+
2. Add only one file and make a commit.
33+
```bash
34+
git add hammer
35+
git commit -m "hammer added"
36+
```
37+
38+
3. Make a second commit that only records a single change.
39+
```bash
40+
git add bottle
41+
git commit -m "water bottle added"
42+
```
43+
44+
4. Similarly, add the final one.
45+
```bash
46+
git add sugar_cube
47+
git commit -m "sugar cube added"
48+
```
49+
50+
<div align="center">
51+
<img src="https://github.com/ArnabKumarRoy02/Learn-git/assets/86621483/c2b8196b-d461-477a-956a-903abbc1e85a" width=400>
52+
<p>Diagram of the solution</p>
53+
</div>

0 commit comments

Comments
 (0)