-
Notifications
You must be signed in to change notification settings - Fork 1
/
using_git.txt
80 lines (50 loc) · 2.52 KB
/
using_git.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
lawtonnichols:cs16/ $ cd git_test [15:17:11]
lawtonnichols:git_test/ $ git init [15:17:25]
Initialized empty Git repository in /Users/lawtonnichols/Desktop/cs16/git_test/.git/
lawtonnichols:git_test/ (master) $ git status [15:17:27]
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
lawtonnichols:git_test/ (master) $ echo "HI" > file.txt [15:17:34]
lawtonnichols:git_test/ (master*) $ git status [15:17:47]
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
file.txt
nothing added to commit but untracked files present (use "git add" to track)
lawtonnichols:git_test/ (master*) $ git add file.txt [15:17:49]
lawtonnichols:git_test/ (master*) $ git status [15:18:03]
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: file.txt
lawtonnichols:git_test/ (master*) $ git commit -c "Initial commit" [15:18:05]
fatal: could not lookup commit Initial commit
lawtonnichols:git_test/ (master*) $ git commit -m "Initial commit" [15:18:19]
[master (root-commit) 10ea924] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 file.txt
lawtonnichols:git_test/ (master) $ git status [15:18:28]
On branch master
nothing to commit, working tree clean
lawtonnichols:git_test/ (master) $ git log [15:18:34]
lawtonnichols:git_test/ (master) $ echo "BYE" > file.txt [15:18:46]
lawtonnichols:git_test/ (master*) $ git status [15:18:53]
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: file.txt
no changes added to commit (use "git add" and/or "git commit -a")
lawtonnichols:git_test/ (master*) $ git add file.txt [15:18:54]
lawtonnichols:git_test/ (master*) $ git status [15:19:07]
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: file.txt
lawtonnichols:git_test/ (master*) $ git commit -m "Second commit" [15:19:08]
[master bcddb3d] Second commit
1 file changed, 1 insertion(+), 1 deletion(-)
lawtonnichols:git_test/ (master) $ git log