Skip to content

Commit bc33e7a

Browse files
Krishnakumar59bregman-arie
authored andcommitted
fixed top-down button issues. (bregman-arie#361)
Co-authored-by: Arie Bregman <bregman.arie@gmail.com>
1 parent 998895d commit bc33e7a

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

topics/git/README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@
1414

1515
<details>
1616
<summary>How do you know if a certain directory is a git repository?</summary><br><b>
17-
1817
You can check if there is a ".git" directory.
19-
</b></details>
18+
</b>
19+
</details>
2020

2121
<details>
22-
<summary>Explain the following: <code>git directory</code>, <code>working directory</code> and <code>staging area</code></summary><br><b>
22+
<summary>Explain the following: <code>git directory</code>, <code>working directory</code> and <code>staging area</code></summary><br>
23+
<b>
2324

2425
This answer taken from [git-scm.com](https://git-scm.com/book/en/v1/Getting-Started-Git-Basics#_the_three_states)
2526

26-
"The Git directory is where Git stores the meta data and object database for your project. This is the most important part of Git, and it is what is copied when you clone a repository from another computer.
27+
"The Git directory is where Git stores the meta-data and object database for your project. This is the most important
28+
part of Git, and it is what is copied when you clone a repository from another computer.
2729

28-
The working directory is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.
30+
The working directory is a single checkout of one version of the project. These files are pulled out of the compressed
31+
database in the Git directory and placed on disk for you to use or modify.
2932

30-
The staging area is a simple file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the index, but it’s becoming standard to refer to it as the staging area."
31-
</b></details>
33+
The staging area is a simple file, generally contained in your Git directory, that stores information about what will go
34+
into your next commit. It’s sometimes referred to as the index, but it’s becoming standard to refer to it as the staging
35+
area."
36+
</b>
37+
</details>
3238

3339
<details>
3440
<summary>What is the difference between <code>git pull</code> and <code>git fetch</code>?</summary><br><b>
@@ -46,20 +52,22 @@ a separate branch in your local repository
4652
<summary>How to check if a file is tracked and if not, then track it?</summary><br><b>
4753

4854
There are different ways to check whether a file is tracked or not:
49-
50-
- `git ls-files <file>` -> exit code of 0 means it's tracked
51-
- `git blame <file>`
55+
- `git ls-files <file>` -> exit code of 0 means it's tracked
56+
- `git blame <file>`
5257
...
53-
</b></details>
58+
</b>
59+
</details>
5460

5561
<details>
5662
<summary>Explain what the file <code>gitignore</code> is used for</summary><br><b>
57-
</b></details>
63+
The purpose of <code>gitignore</code> files is to ensure that certain files not tracked by Git remain untracked. To stop tracking a file that is currently tracked, use git rm --cached.
64+
</b>
65+
</details>
5866

5967
<details>
6068
<summary>How can you see which changes have done before committing them?</summary><br><b>
61-
6269
`git diff`
70+
6371
</b></details>
6472

6573
<details>
@@ -72,7 +80,8 @@ There are different ways to check whether a file is tracked or not:
7280
<summary>You've created new files in your repository. How to make sure Git tracks them?</summary><br><b>
7381

7482
`git add FILES`
75-
</b></details>
83+
</b>
84+
</details>
7685

7786
### Scenarios
7887

@@ -130,13 +139,14 @@ True
130139

131140
<details>
132141
<summary>You have two branches - main and devel. How do you make sure devel is in sync with main?</summary><br><b>
133-
142+
<code>
134143
```
135144
git checkout main
136145
git pull
137146
git checkout devel
138147
git merge main
139148
```
149+
</code>
140150

141151
</b></details>
142152

@@ -237,6 +247,7 @@ Using the `git rebase` command
237247
<details>
238248
<summary>In what situations are you using <code>git rebase</code>?</summary><br><b>
239249
Suppose a team is working on a `feature` branch that is coming from the `main` branch of the repo. At a point, where the feature development is done, and finally we wish to merge the feature branch into the main branch without keeping the history of the commits made in the feature branch, a `git rebase` will be helpful.
250+
240251
</b></details>
241252

242253
<details>

0 commit comments

Comments
 (0)