From 58d0a20307a14398562c0e5cd91a3141113f68f3 Mon Sep 17 00:00:00 2001
From: "Pranay K. Singh" <35093184+pranay999000@users.noreply.github.com>
Date: Sat, 25 Mar 2023 16:29:55 +0530
Subject: [PATCH] corrected spelling mistake (#362)
* corrected spelling mistake
* changed text to code in git/README.md
* corrected spelling mistake
---
topics/git/README.md | 63 ++++++++++++++++++++++++--------------------
1 file changed, 34 insertions(+), 29 deletions(-)
diff --git a/topics/git/README.md b/topics/git/README.md
index 3a8e202..9a10cf1 100644
--- a/topics/git/README.md
+++ b/topics/git/README.md
@@ -2,11 +2,11 @@
## Exercises
-|Name|Topic|Objective & Instructions|Solution|Comments|
-|--------|--------|------|----|----|
-| My first Commit | Commit | [Exercise](commit_01.md) | [Solution](solutions/commit_01_solution.md) | |
-| Time to Branch | Branch | [Exercise](branch_01.md) | [Solution](solutions/branch_01_solution.md) | |
-| Squashing Commits | Commit | [Exercise](squashing_commits.md) | [Solution](solutions/squashing_commits.md) | |
+| Name | Topic | Objective & Instructions | Solution | Comments |
+| ----------------- | ------ | -------------------------------- | ------------------------------------------- | -------- |
+| My first Commit | Commit | [Exercise](commit_01.md) | [Solution](solutions/commit_01_solution.md) | |
+| Time to Branch | Branch | [Exercise](branch_01.md) | [Solution](solutions/branch_01_solution.md) | |
+| Squashing Commits | Commit | [Exercise](squashing_commits.md) | [Solution](solutions/squashing_commits.md) | |
## Questions
@@ -47,10 +47,10 @@ a separate branch in your local repository
There are different ways to check whether a file is tracked or not:
- - `git ls-files Explain what the file
gitignore is used for
@@ -95,8 +95,8 @@ One thing to do about it, would be to use the built-in `fsmonitor` (filesystem m
Next, you can try to enable `feature.manyFile` with `git config feature.manyFiles true`. This does two things:
- 1. Sets `index.version = 4` which enables path-prefix compression in the index
- 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.
+1. Sets `index.version = 4` which enables path-prefix compression in the index
+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.
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.
@@ -113,10 +113,10 @@ Finally, with certain build systems, you can know which files are being used/rel
What's is the branch strategy (flow) you know?
-* Git flow
-* GitHub flow
-* Trunk based development
-* GitLab flow
+- Git flow
+- GitHub flow
+- Trunk based development
+- GitLab flow
[Explanation](https://www.bmc.com/blogs/devops-branching-strategies/#:~:text=What%20is%20a%20branching%20strategy,used%20in%20the%20development%20process).
@@ -137,6 +137,7 @@ git pull
git checkout devel
git merge main
```
+
What
unstaged means in regards to Git?
-A file the is in the working directory but is not in the HEAD nor in the staging area, referred to as "unstaged".
+A file that is in the working directory but is not in the HEAD nor in the staging area is referred to as "unstaged".
You have two branches - main and devel. How do you merge devel into main?
+```
git checkout main
git merge devel
git push origin main
+```
+
.git directory? What can you find there?.git 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.
-
This info copied from [https://stackoverflow.com/questions/29217859/what-is-the-git-folder](https://stackoverflow.com/questions/29217859/what-is-the-git-folder)
git status 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?