@@ -24,14 +24,15 @@ If you run this command directly after a clone, you should see something like th
24
24
----
25
25
$ git status
26
26
On branch master
27
+ Your branch is up-to-date with 'origin/master'.
27
28
nothing to commit, working directory clean
28
29
----
29
30
30
31
This means you have a clean working directory – in other words, there are no tracked and modified files.
31
32
Git also doesn't see any untracked files, or they would be listed here.
32
33
Finally, the command tells you which branch you're on and informs you that it has not diverged from the same branch on the server.
33
34
For now, that branch is always ``master'', which is the default; you won't worry about it here.
34
- <<_git_branching>> will go over branches and references in detail.
35
+ <<_git_branching>> will go over branches and references in detail.
35
36
36
37
Let's say you add a new file to your project, a simple README file.
37
38
If the file didn't exist before, and you run `git status`, you see your untracked file like so:
@@ -41,6 +42,7 @@ If the file didn't exist before, and you run `git status`, you see your untracke
41
42
$ echo 'My Project' > README
42
43
$ git status
43
44
On branch master
45
+ Your branch is up-to-date with 'origin/master'.
44
46
Untracked files:
45
47
(use "git add <file>..." to include in what will be committed)
46
48
@@ -71,6 +73,7 @@ If you run your status command again, you can see that your README file is now t
71
73
----
72
74
$ git status
73
75
On branch master
76
+ Your branch is up-to-date with 'origin/master'.
74
77
Changes to be committed:
75
78
(use "git reset HEAD <file>..." to unstage)
76
79
@@ -92,6 +95,7 @@ If you change a previously tracked file called `CONTRIBUTING.md` and then run yo
92
95
----
93
96
$ git status
94
97
On branch master
98
+ Your branch is up-to-date with 'origin/master'.
95
99
Changes to be committed:
96
100
(use "git reset HEAD <file>..." to unstage)
97
101
@@ -116,6 +120,7 @@ Let's run `git add` now to stage the `CONTRIBUTING.md` file, and then run `git s
116
120
$ git add CONTRIBUTING.md
117
121
$ git status
118
122
On branch master
123
+ Your branch is up-to-date with 'origin/master'.
119
124
Changes to be committed:
120
125
(use "git reset HEAD <file>..." to unstage)
121
126
@@ -134,6 +139,7 @@ However, let's run `git status` one more time:
134
139
$ vim CONTRIBUTING.md
135
140
$ git status
136
141
On branch master
142
+ Your branch is up-to-date with 'origin/master'.
137
143
Changes to be committed:
138
144
(use "git reset HEAD <file>..." to unstage)
139
145
@@ -160,6 +166,7 @@ If you modify a file after you run `git add`, you have to run `git add` again to
160
166
$ git add CONTRIBUTING.md
161
167
$ git status
162
168
On branch master
169
+ Your branch is up-to-date with 'origin/master'.
163
170
Changes to be committed:
164
171
(use "git reset HEAD <file>..." to unstage)
165
172
@@ -263,6 +270,7 @@ If you run your `git status` command, you once again see something like this:
263
270
----
264
271
$ git status
265
272
On branch master
273
+ Your branch is up-to-date with 'origin/master'.
266
274
Changes to be committed:
267
275
(use "git reset HEAD <file>..." to unstage)
268
276
@@ -326,6 +334,7 @@ $ git add CONTRIBUTING.md
326
334
$ echo '# test line' >> CONTRIBUTING.md
327
335
$ git status
328
336
On branch master
337
+ Your branch is up-to-date with 'origin/master'.
329
338
Changes to be committed:
330
339
(use "git reset HEAD <file>..." to unstage)
331
340
@@ -409,6 +418,8 @@ The editor displays the following text (this example is a Vim screen):
409
418
# Please enter the commit message for your changes. Lines starting
410
419
# with '#' will be ignored, and an empty message aborts the commit.
411
420
# On branch master
421
+ # Your branch is up-to-date with 'origin/master'.
422
+ #
412
423
# Changes to be committed:
413
424
# new file: README
414
425
# modified: CONTRIBUTING.md
@@ -453,6 +464,7 @@ Adding the `-a` option to the `git commit` command makes Git automatically stage
453
464
----
454
465
$ git status
455
466
On branch master
467
+ Your branch is up-to-date with 'origin/master'.
456
468
Changes not staged for commit:
457
469
(use "git add <file>..." to update what will be committed)
458
470
(use "git checkout -- <file>..." to discard changes in working directory)
@@ -501,6 +513,7 @@ $ git rm PROJECTS.md
501
513
rm 'PROJECTS.md'
502
514
$ git status
503
515
On branch master
516
+ Your branch is up-to-date with 'origin/master'.
504
517
Changes to be committed:
505
518
(use "git reset HEAD <file>..." to unstage)
506
519
@@ -565,6 +578,7 @@ In fact, if you run something like this and look at the status, you'll see that
565
578
$ git mv README.md README
566
579
$ git status
567
580
On branch master
581
+ Your branch is up-to-date with 'origin/master'.
568
582
Changes to be committed:
569
583
(use "git reset HEAD <file>..." to unstage)
570
584
0 commit comments