You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/book/01-introduction/chapter1.asc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ You will see these hash values all over the place in Git because it uses them so
96
96
97
97
==== Git Generally Only Adds Data
98
98
99
-
When you do actions in Git, nearly all of them only add data to the Git database. It is very difficult to get the system to do anything that is not undoable or to make it erase data in any way. As in any VCS, you can lose or mess up changes you haven’t committed yet; but after you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository.
99
+
When you do actions in Git, nearly all of them only add data to the Git database. It is hard to get the system to do anything that is not undoable or to make it erase data in any way. As in any VCS, you can lose or mess up changes you haven’t committed yet; but after you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository.
100
100
101
101
This makes using Git a joy because we know we can experiment without the danger of severely screwing things up. For a more in-depth look at how Git stores its data and how you can recover data that seems lost, see <<_git_objects>>.
102
102
@@ -113,15 +113,15 @@ The Git directory is where Git stores the metadata and object database for your
113
113
114
114
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.
115
115
116
-
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.
116
+
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 also common to refer to it as the staging area.
117
117
118
118
The basic Git workflow goes something like this:
119
119
120
120
1. You modify files in your working directory.
121
121
2. You stage the files, adding snapshots of them to your staging area.
122
122
3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
123
123
124
-
If a particular version of a file is in the git directory, it’s considered committed. If it’s modified but has been added to the staging area, it is staged. And if it was changed since it was checked out but has not been staged, it is modified. In <<_git_basics_chapter>>, you’ll learn more about these states and how you can either take advantage of them or skip the staged part entirely.
124
+
If a particular version of a file is in the Git directory, it’s considered committed. If it’s modified but has been added to the staging area, it is staged. And if it was changed since it was checked out but has not been staged, it is modified. In <<_git_basics_chapter>>, you’ll learn more about these states and how you can either take advantage of them or skip the staged part entirely.
0 commit comments