Skip to content

Commit 58d0a20

Browse files
authored
corrected spelling mistake (iluwatar#362)
* corrected spelling mistake * changed text to code in git/README.md * corrected spelling mistake
1 parent 0939fd7 commit 58d0a20

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed

topics/git/README.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Exercises
44

5-
|Name|Topic|Objective & Instructions|Solution|Comments|
6-
|--------|--------|------|----|----|
7-
| My first Commit | Commit | [Exercise](commit_01.md) | [Solution](solutions/commit_01_solution.md) | |
8-
| Time to Branch | Branch | [Exercise](branch_01.md) | [Solution](solutions/branch_01_solution.md) | |
9-
| Squashing Commits | Commit | [Exercise](squashing_commits.md) | [Solution](solutions/squashing_commits.md) | |
5+
| Name | Topic | Objective & Instructions | Solution | Comments |
6+
| ----------------- | ------ | -------------------------------- | ------------------------------------------- | -------- |
7+
| My first Commit | Commit | [Exercise](commit_01.md) | [Solution](solutions/commit_01_solution.md) | |
8+
| Time to Branch | Branch | [Exercise](branch_01.md) | [Solution](solutions/branch_01_solution.md) | |
9+
| Squashing Commits | Commit | [Exercise](squashing_commits.md) | [Solution](solutions/squashing_commits.md) | |
1010

1111
## Questions
1212

@@ -47,10 +47,10 @@ a separate branch in your local repository
4747

4848
There are different ways to check whether a file is tracked or not:
4949

50-
- `git ls-files <file>` -> exit code of 0 means it's tracked
51-
- `git blame <file>`
50+
- `git ls-files <file>` -> exit code of 0 means it's tracked
51+
- `git blame <file>`
5252
...
53-
</b></details>
53+
</b></details>
5454

5555
<details>
5656
<summary>Explain what the file <code>gitignore</code> is used for</summary><br><b>
@@ -95,8 +95,8 @@ One thing to do about it, would be to use the built-in `fsmonitor` (filesystem m
9595

9696
Next, you can try to enable `feature.manyFile` with `git config feature.manyFiles true`. This does two things:
9797

98-
1. Sets `index.version = 4` which enables path-prefix compression in the index
99-
2. Sets `core.untrackedCache=true` which by default is set to `keep`. The untracked cache is quite important concept. What it does is to record the mtime of all the files and directories in the working directory. This way, when time comes to iterate over all the files and directories, it can skip those whom mtime wasn't updated.
98+
1. Sets `index.version = 4` which enables path-prefix compression in the index
99+
2. Sets `core.untrackedCache=true` which by default is set to `keep`. The untracked cache is quite important concept. What it does is to record the mtime of all the files and directories in the working directory. This way, when time comes to iterate over all the files and directories, it can skip those whom mtime wasn't updated.
100100

101101
Before enabling it, you might want to run `git update-index --test-untracked-cache` to test it out and make sure mtime operational on your system.
102102

@@ -113,10 +113,10 @@ Finally, with certain build systems, you can know which files are being used/rel
113113
<details>
114114
<summary>What's is the branch strategy (flow) you know?</summary><br><b>
115115

116-
* Git flow
117-
* GitHub flow
118-
* Trunk based development
119-
* GitLab flow
116+
- Git flow
117+
- GitHub flow
118+
- Trunk based development
119+
- GitLab flow
120120

121121
[Explanation](https://www.bmc.com/blogs/devops-branching-strategies/#:~:text=What%20is%20a%20branching%20strategy,used%20in%20the%20development%20process).
122122

@@ -137,6 +137,7 @@ git pull
137137
git checkout devel
138138
git merge main
139139
```
140+
140141
</b></details>
141142

142143
<details>
@@ -154,7 +155,7 @@ Using the HEAD file: `.git/HEAD`
154155
<details>
155156
<summary>What <code>unstaged</code> means in regards to Git?</summary><br><b>
156157

157-
A file the is in the working directory but is not in the HEAD nor in the staging area, referred to as "unstaged".
158+
A file that is in the working directory but is not in the HEAD nor in the staging area is referred to as "unstaged".
158159
</b></details>
159160

160161
<details>
@@ -168,9 +169,12 @@ True
168169
<details>
169170
<summary>You have two branches - main and devel. How do you merge devel into main?</summary><br><b>
170171

172+
```
171173
git checkout main
172174
git merge devel
173175
git push origin main
176+
```
177+
174178
</b></details>
175179

176180
<details>
@@ -203,8 +207,8 @@ This page explains it the best: https://git-scm.com/docs/merge-strategies
203207

204208
Probably good to mention that it's:
205209

206-
* It's good for cases of merging more than one branch (and also the default of such use cases)
207-
* It's primarily meant for bundling topic branches together
210+
- It's good for cases of merging more than one branch (and also the default of such use cases)
211+
- It's primarily meant for bundling topic branches together
208212

209213
This is a great article about Octopus merge: http://www.freblogg.com/2016/12/git-octopus-merge.html
210214
</b></details>
@@ -218,6 +222,7 @@ This is a great article about Octopus merge: http://www.freblogg.com/2016/12/git
218222

219223
`git reset` depends on the usage, can modify the index or change the commit which the branch head
220224
is currently pointing at.
225+
221226
</p>
222227
</b></details>
223228

@@ -240,6 +245,7 @@ Suppose a team is working on a `feature` branch that is coming from the `main` b
240245
```
241246
git checkout HEAD~1 -- /path/of/the/file
242247
```
248+
243249
</b></details>
244250

245251
<details>
@@ -250,16 +256,15 @@ git checkout HEAD~1 -- /path/of/the/file
250256
<summary>What is the <code>.git</code> directory? What can you find there?</summary><br><b>
251257
The <code>.git</code> folder contains all the information that is necessary for your project in version control and all the information about commits, remote repository address, etc. All of them are present in this folder. It also contains a log that stores your commit history so that you can roll back to history.
252258

253-
254259
This info copied from [https://stackoverflow.com/questions/29217859/what-is-the-git-folder](https://stackoverflow.com/questions/29217859/what-is-the-git-folder)
255260
</b></details>
256261

257262
<details>
258263
<summary>What are some Git anti-patterns? Things that you shouldn't do</summary><br><b>
259264

260-
* Not waiting too long between commits
261-
* Not removing the .git directory :)
262-
</b></details>
265+
- Not waiting too long between commits
266+
- Not removing the .git directory :)
267+
</b></details>
263268

264269
<details>
265270
<summary>How do you remove a remote branch?</summary><br><b>
@@ -334,20 +339,20 @@ Shortly, it runs `git diff` twice:
334339

335340
1. Compare between HEAD to staging area
336341
2. Compare staging area to working directory
337-
</b></details>
342+
</b></details>
338343

339344
<details>
340345
<summary>If <code>git status</code> has to run diff on all the files in the HEAD commit to those in staging area/index and another one on staging area/index and working directory, how is it fairly fast? </summary><br><b>
341346

342347
One reason is about the structure of the index, commits, etc.
343348

344-
* Every file in a commit is stored in tree object
345-
* The index is then a flattened structure of tree objects
346-
* All files in the index have pre-computed hashes
347-
* The diff operation then, is comparing the hashes
349+
- Every file in a commit is stored in tree object
350+
- The index is then a flattened structure of tree objects
351+
- All files in the index have pre-computed hashes
352+
- The diff operation then, is comparing the hashes
348353

349354
Another reason is caching
350355

351-
* Index caches information on working directory
352-
* When Git has the information for certain file cached, there is no need to look at the working directory file
353-
</b></details>
356+
- Index caches information on working directory
357+
- When Git has the information for certain file cached, there is no need to look at the working directory file
358+
</b></details>

0 commit comments

Comments
 (0)