[ Prev ]
2020-10-28

-- Oct 28 In-Class Exercise Thread
Last login: Wed Oct 28 18:48:34 on ttys000 Luksawee@LuksaweeMac ~ % cd Desktop Luksawee@LuksaweeMac Desktop % mkdir gitFern Luksawee@LuksaweeMac Desktop % cd gitFern Luksawee@LuksaweeMac gitFern % git init Initialized empty Git repository in /Users/Luksawee/Desktop/gitFern/.git/ Luksawee@LuksaweeMac gitFern % git add . Luksawee@LuksaweeMac gitFern % echo "My name is: " > hello.txt Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "Initia Commit" [master (root-commit) 2bdf055] Initia Commit
 1 file changed, 1 insertion(+)
 create mode 100644 hello.txt
Luksawee@LuksaweeMac gitFern % touch hello.txt Luksawee@LuksaweeMac gitFern % open hello.txt Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add L" [master f3fe588] add L
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add U" [master 54f14ef] add U
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add K" [master 7b5f645] add K
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add S" [master 58676bb] add S
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add A again" [master eca764a] add A again
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add W" [master 122edae] add W
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add E" [master 54208aa] add E
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add E2" [master a3a705a] add E2
 1 file changed, 1 insertion(+), 1 deletion(-)
Luksawee@LuksaweeMac gitFern % git log commit a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 (HEAD -> master) Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:24 2020 -0700
    add E2
commit 54208aac544eec3f1d8ddfe1cfdd547a4cac268e Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:02 2020 -0700
    add E
commit 122edaedafdd9427d69f80db718a0f231c2184f1 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:45 2020 -0700
    add W
commit eca764ab4d27d75abafe82f7a44ecb6120f9338a Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:26 2020 -0700
    add A again
commit f3fe588213c5a28a057af617eee570ff3fd29ab6 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:11:55 2020 -0700
    add L
commit 2bdf05597167e940f660c60919e5d1915ed70f05 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:10:52 2020 -0700
    Initia Commit
~ Luksawee@LuksaweeMac gitFern % git format patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --std > my.patch git: 'format' is not a git command. See 'git --help'. Luksawee@LuksaweeMac gitFern % git format-patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --std > my.patch fatal: unrecognized argument: --std Luksawee@LuksaweeMac gitFern % git format-patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --stdout > my.patch Luksawee@LuksaweeMac gitFern % git format-patch 2bdf05597167e940f660c60919e5d1915ed70f05 --stdout > myName.patch Luksawee@LuksaweeMac gitFern % git apply --check myName.patch error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply Luksawee@LuksaweeMac gitFern % git tag -a V1 a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 -m "Version1" Luksawee@LuksaweeMac gitFern % git log commit a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 (HEAD -> master, tag: V1) Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:24 2020 -0700
    add E2
commit 54208aac544eec3f1d8ddfe1cfdd547a4cac268e Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:02 2020 -0700
    add E
commit 122edaedafdd9427d69f80db718a0f231c2184f1 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:45 2020 -0700
    add W
commit eca764ab4d27d75abafe82f7a44ecb6120f9338a Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:26 2020 -0700
    add A again
commit 58676bbc57fed085e6c31872646444b5eeaf74a2 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:03 2020 -0700
    add S
commit 2bdf05597167e940f660c60919e5d1915ed70f05 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:10:52 2020 -0700
    Initia Commit
Luksawee@LuksaweeMac gitFern %

----- PATCH From f3fe588213c5a28a057af617eee570ff3fd29ab6 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:11:55 -0700 Subject: [PATCH 1/8] add L
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 34459eb..964db7a 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: +My name is: L \ No newline at end of file -- 2.24.3 (Apple Git-128)
From 54f14ef095eba151047ab06f2852f407eeab5e11 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:12:13 -0700 Subject: [PATCH 2/8] add U
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 964db7a..123907e 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: L \ No newline at end of file +My name is: LU \ No newline at end of file -- 2.24.3 (Apple Git-128)
From 7b5f64535e1d0af079396451dc3a433e58b70aee Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:12:33 -0700 Subject: [PATCH 3/8] add K
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 123907e..9857e66 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LU \ No newline at end of file +My name is: LUK \ No newline at end of file -- 2.24.3 (Apple Git-128)
From 58676bbc57fed085e6c31872646444b5eeaf74a2 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:03 -0700 Subject: [PATCH 4/8] add S
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 9857e66..d309462 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LUK \ No newline at end of file +My name is: LUKS \ No newline at end of file -- 2.24.3 (Apple Git-128)
From eca764ab4d27d75abafe82f7a44ecb6120f9338a Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:26 -0700 Subject: [PATCH 5/8] add A again
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index d309462..d74d2cf 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LUKS \ No newline at end of file +My name is: LUKSA \ No newline at end of file -- 2.24.3 (Apple Git-128)
From 122edaedafdd9427d69f80db718a0f231c2184f1 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:45 -0700 Subject: [PATCH 6/8] add W
---
 hello.txt | 2 +-
 1 file changed, 1 inser
(Edited: 2020-10-28)
Last login: Wed Oct 28 18:48:34 on ttys000 Luksawee@LuksaweeMac ~ % cd Desktop Luksawee@LuksaweeMac Desktop % mkdir gitFern Luksawee@LuksaweeMac Desktop % cd gitFern Luksawee@LuksaweeMac gitFern % git init Initialized empty Git repository in /Users/Luksawee/Desktop/gitFern/.git/ Luksawee@LuksaweeMac gitFern % git add . Luksawee@LuksaweeMac gitFern % echo "My name is: " > hello.txt Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "Initia Commit" [master (root-commit) 2bdf055] Initia Commit 1 file changed, 1 insertion(+) create mode 100644 hello.txt Luksawee@LuksaweeMac gitFern % touch hello.txt Luksawee@LuksaweeMac gitFern % open hello.txt Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add L" [master f3fe588] add L 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add U" [master 54f14ef] add U 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add K" [master 7b5f645] add K 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add S" [master 58676bb] add S 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add A again" [master eca764a] add A again 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add W" [master 122edae] add W 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add E" [master 54208aa] add E 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git add hello.txt Luksawee@LuksaweeMac gitFern % git commit -a -m "add E2" [master a3a705a] add E2 1 file changed, 1 insertion(+), 1 deletion(-) Luksawee@LuksaweeMac gitFern % git log commit a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 (HEAD -> master) Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:24 2020 -0700 add E2 commit 54208aac544eec3f1d8ddfe1cfdd547a4cac268e Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:02 2020 -0700 add E commit 122edaedafdd9427d69f80db718a0f231c2184f1 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:45 2020 -0700 add W commit eca764ab4d27d75abafe82f7a44ecb6120f9338a Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:26 2020 -0700 add A again commit f3fe588213c5a28a057af617eee570ff3fd29ab6 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:11:55 2020 -0700 add L commit 2bdf05597167e940f660c60919e5d1915ed70f05 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:10:52 2020 -0700 Initia Commit ~ Luksawee@LuksaweeMac gitFern % git format patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --std > my.patch git: 'format' is not a git command. See 'git --help'. Luksawee@LuksaweeMac gitFern % git format-patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --std > my.patch fatal: unrecognized argument: --std Luksawee@LuksaweeMac gitFern % git format-patch f3fe588213c5a28a057af617eee570ff3fd29ab6 --stdout > my.patch Luksawee@LuksaweeMac gitFern % git format-patch 2bdf05597167e940f660c60919e5d1915ed70f05 --stdout > myName.patch Luksawee@LuksaweeMac gitFern % git apply --check myName.patch error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply error: patch failed: hello.txt:1 error: hello.txt: patch does not apply Luksawee@LuksaweeMac gitFern % git tag -a V1 a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 -m "Version1" Luksawee@LuksaweeMac gitFern % git log commit a3a705a26e5120bdf9161a65b0dc6d7a358ca5f5 (HEAD -> master, tag: V1) Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:24 2020 -0700 add E2 commit 54208aac544eec3f1d8ddfe1cfdd547a4cac268e Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:14:02 2020 -0700 add E commit 122edaedafdd9427d69f80db718a0f231c2184f1 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:45 2020 -0700 add W commit eca764ab4d27d75abafe82f7a44ecb6120f9338a Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:26 2020 -0700 add A again commit 58676bbc57fed085e6c31872646444b5eeaf74a2 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:13:03 2020 -0700 add S commit 2bdf05597167e940f660c60919e5d1915ed70f05 Author: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed Oct 28 20:10:52 2020 -0700 Initia Commit Luksawee@LuksaweeMac gitFern % --------- PATCH From f3fe588213c5a28a057af617eee570ff3fd29ab6 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:11:55 -0700 Subject: [PATCH 1/8] add L --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 34459eb..964db7a 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: +My name is: L \ No newline at end of file -- 2.24.3 (Apple Git-128) From 54f14ef095eba151047ab06f2852f407eeab5e11 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:12:13 -0700 Subject: [PATCH 2/8] add U --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 964db7a..123907e 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: L \ No newline at end of file +My name is: LU \ No newline at end of file -- 2.24.3 (Apple Git-128) From 7b5f64535e1d0af079396451dc3a433e58b70aee Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:12:33 -0700 Subject: [PATCH 3/8] add K --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 123907e..9857e66 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LU \ No newline at end of file +My name is: LUK \ No newline at end of file -- 2.24.3 (Apple Git-128) From 58676bbc57fed085e6c31872646444b5eeaf74a2 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:03 -0700 Subject: [PATCH 4/8] add S --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 9857e66..d309462 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LUK \ No newline at end of file +My name is: LUKS \ No newline at end of file -- 2.24.3 (Apple Git-128) From eca764ab4d27d75abafe82f7a44ecb6120f9338a Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:26 -0700 Subject: [PATCH 5/8] add A again --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index d309462..d74d2cf 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -My name is: LUKS \ No newline at end of file +My name is: LUKSA \ No newline at end of file -- 2.24.3 (Apple Git-128) From 122edaedafdd9427d69f80db718a0f231c2184f1 Mon Sep 17 00:00:00 2001 From: LuksaweeP <luksawee.phansri@gmail.com> Date: Wed, 28 Oct 2020 20:13:45 -0700 Subject: [PATCH 6/8] add W --- hello.txt | 2 +- 1 file changed, 1 inser

-- Oct 28 In-Class Exercise Thread
~> cd D:/Desktop/my_project
 /d/Desktop/my_project> git init
Initialized empty Git repository in D:/Desktop/my_project/.git/
 /d/Desktop/my_project> git add .
 /d/Desktop/my_project> git commit -m "Initialized repository"
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track) /d/Desktop/my_project> git add .
 /d/Desktop/my_project> git commit -m "Add hello.txt"
[master (root-commit) 978b6a5] Add hello.txt
 1 file changed, 1 insertion(+)
 create mode 100644 hello.txt
'git <command> [<revision>...] -- [<file>...]'
 /d/Desktop/my_project> git format-patch
 /d/Desktop/my_project> git help format-patch
'git <command> [<revision>...] -- [<file>...]'
 /d/Desktop/my_project> git format-patch master
 /d/Desktop/my_project> git diff
 /d/Desktop/my_project> git commit
On branch master Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   hello.txt
no changes added to commit (use "git add" and/or "git commit -a") hint: "git config advice.addEmptyPathspec false" /d/Desktop/my_project> git add hello.txt /d/Desktop/my_project> git format-patch
 /d/Desktop/my_project> git diff
/d/Desktop/my_project> git commit -m "2nd commit" [master 7030ed4] 2nd commit
 1 file changed, 2 insertions(+), 1 deletion(-)
 /d/Desktop/my_project> git diff 978b6a5
diff --git a/hello.txt b/hello.txt index af94ff0..1970299 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1,2 @@ -My name is: Crispino Madamba \ No newline at end of file +My name is: Crispino Madamba +SJSU \ No newline at end of file
 /d/Desktop/my_project> git diff 978b6a5 > patch1.patch
 /d/Desktop/my_project> git commit -m "third commit"
On branch master Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   hello.txt
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        patch1.patch
no changes added to commit (use "git add" and/or "git commit -a")
 /d/Desktop/my_project> git add hello.txt
 /d/Desktop/my_project> git commit -m "third commit"
[master 8a3d190] third commit
 1 file changed, 1 insertion(+), 1 deletion(-)
 /d/Desktop/my_project> git tag -a v1 8a3d190 -m "version1"
 /d/Desktop/my_project> git commit
On branch master Untracked files:
  (use "git add <file>..." to include in what will be committed)
        patch1.patch
nothing added to commit but untracked files present (use "git add" to track)
 /d/Desktop/my_project> git apply --check patch1.patch
error: patch failed: hello.txt:1 error: hello.txt: patch does not apply
 /d/Desktop/my_project> git add .
warning: LF will be replaced by CRLF in patch1.patch. The file will have its original line endings in your working directory
 /d/Desktop/my_project> git apply --check patch1.patch
error: patch failed: hello.txt:1 error: hello.txt: patch does not apply
 /d/Desktop/my_project> git log
commit 8a3d19059077856c8dae613d66e4ba2c07d6ae08 (HEAD -> master, tag: v1) Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Thu Oct 29 01:13:23 2020 -0700
    third commit
commit 7030ed439dda67a40dd7b324f38ce5ed7215002f Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Thu Oct 29 01:11:21 2020 -0700
    2nd commit
commit 978b6a5ba09546b2e2255ea7c9c31692497cbebb Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Wed Oct 28 23:45:17 2020 -0700
    Add hello.txt
 /d/Desktop/my_project> git apply --stat patch1.patch
 hello.txt |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 /d/Desktop/my_project> git am --signoff < patch1.patch
fatal: Dirty index: cannot apply patches (dirty: patch1.patch)
 /d/Desktop/my_project> git diff
/d/Desktop/my_project> git reset
 /d/Desktop/my_project> git apply --stat patch1.patch
 hello.txt |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 /d/Desktop/my_project> git am --signoff < patch1.patch
fatal: previous rebase directory .git/rebase-apply still exists but mbox given. /d/Desktop/my_project> git am --abort
 /d/Desktop/my_project> ^C
 /d/Desktop/my_project>
/d/Desktop/my_project> git status On branch master Untracked files:
  (use "git add <file>..." to include in what will be committed)
        patch1.patch
nothing added to commit but untracked files present (use "git add" to track) /d/Desktop/my_project> git format-patch 7030ed4 --stdout >my.patch
 /d/Desktop/my_project> git apply --stat my.patch
 hello.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 /d/Desktop/my_project> git am --signoff < my.patch
error: patch failed: hello.txt:1 error: hello.txt: patch does not apply hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: third commit Patch failed at 0001 third commit When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
 /d/Desktop/my_project> git am --show-current-patch=diff
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 1970299..61ed9d6 100644 --- a/hello.txt +++ b/hello.txt @@ -1,2 +1,2 @@
 My name is: Crispino Madamba
-SJSU \ No newline at end of file +SJSU is cool \ No newline at end of file -- 2.29.1.windows.1
 /d/Desktop/my_project>
(Edited: 2020-10-29)
~> cd D:/Desktop/my_project /d/Desktop/my_project> git init Initialized empty Git repository in D:/Desktop/my_project/.git/ /d/Desktop/my_project> git add . /d/Desktop/my_project> git commit -m "Initialized repository" On branch master Initial commit nothing to commit (create/copy files and use "git add" to track) /d/Desktop/my_project> git add . /d/Desktop/my_project> git commit -m "Add hello.txt" [master (root-commit) 978b6a5] Add hello.txt 1 file changed, 1 insertion(+) create mode 100644 hello.txt 'git <command> [<revision>...] -- [<file>...]' /d/Desktop/my_project> git format-patch /d/Desktop/my_project> git help format-patch 'git <command> [<revision>...] -- [<file>...]' /d/Desktop/my_project> git format-patch master /d/Desktop/my_project> git diff /d/Desktop/my_project> git commit On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: hello.txt no changes added to commit (use "git add" and/or "git commit -a") hint: "git config advice.addEmptyPathspec false" /d/Desktop/my_project> git add hello.txt /d/Desktop/my_project> git format-patch /d/Desktop/my_project> git diff /d/Desktop/my_project> git commit -m "2nd commit" [master 7030ed4] 2nd commit 1 file changed, 2 insertions(+), 1 deletion(-) /d/Desktop/my_project> git diff 978b6a5 diff --git a/hello.txt b/hello.txt index af94ff0..1970299 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1,2 @@ -My name is: Crispino Madamba \ No newline at end of file +My name is: Crispino Madamba +SJSU \ No newline at end of file /d/Desktop/my_project> git diff 978b6a5 > patch1.patch /d/Desktop/my_project> git commit -m "third commit" On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: hello.txt Untracked files: (use "git add <file>..." to include in what will be committed) patch1.patch no changes added to commit (use "git add" and/or "git commit -a") /d/Desktop/my_project> git add hello.txt /d/Desktop/my_project> git commit -m "third commit" [master 8a3d190] third commit 1 file changed, 1 insertion(+), 1 deletion(-) /d/Desktop/my_project> git tag -a v1 8a3d190 -m "version1" /d/Desktop/my_project> git commit On branch master Untracked files: (use "git add <file>..." to include in what will be committed) patch1.patch nothing added to commit but untracked files present (use "git add" to track) /d/Desktop/my_project> git apply --check patch1.patch error: patch failed: hello.txt:1 error: hello.txt: patch does not apply /d/Desktop/my_project> git add . warning: LF will be replaced by CRLF in patch1.patch. The file will have its original line endings in your working directory /d/Desktop/my_project> git apply --check patch1.patch error: patch failed: hello.txt:1 error: hello.txt: patch does not apply /d/Desktop/my_project> git log commit 8a3d19059077856c8dae613d66e4ba2c07d6ae08 (HEAD -> master, tag: v1) Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Thu Oct 29 01:13:23 2020 -0700 third commit commit 7030ed439dda67a40dd7b324f38ce5ed7215002f Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Thu Oct 29 01:11:21 2020 -0700 2nd commit commit 978b6a5ba09546b2e2255ea7c9c31692497cbebb Author: Crispino Madamba <madamba.crispino@gmail.com> Date: Wed Oct 28 23:45:17 2020 -0700 Add hello.txt /d/Desktop/my_project> git apply --stat patch1.patch hello.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) /d/Desktop/my_project> git am --signoff < patch1.patch fatal: Dirty index: cannot apply patches (dirty: patch1.patch) /d/Desktop/my_project> git diff /d/Desktop/my_project> git reset /d/Desktop/my_project> git apply --stat patch1.patch hello.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) /d/Desktop/my_project> git am --signoff < patch1.patch fatal: previous rebase directory .git/rebase-apply still exists but mbox given. /d/Desktop/my_project> git am --abort /d/Desktop/my_project> ^C /d/Desktop/my_project> /d/Desktop/my_project> git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) patch1.patch nothing added to commit but untracked files present (use "git add" to track) /d/Desktop/my_project> git format-patch 7030ed4 --stdout >my.patch /d/Desktop/my_project> git apply --stat my.patch hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) /d/Desktop/my_project> git am --signoff < my.patch error: patch failed: hello.txt:1 error: hello.txt: patch does not apply hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: third commit Patch failed at 0001 third commit When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". /d/Desktop/my_project> git am --show-current-patch=diff --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 1970299..61ed9d6 100644 --- a/hello.txt +++ b/hello.txt @@ -1,2 +1,2 @@ My name is: Crispino Madamba -SJSU \ No newline at end of file +SJSU is cool \ No newline at end of file -- 2.29.1.windows.1 /d/Desktop/my_project>
2020-11-02

-- Oct 28 In-Class Exercise Thread
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git init Initialized empty Git repository in F:/School/2020 Fall/CS 174 - Web Programming/Exercises/.git/
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "commit" [master (root-commit) 0b4aa96] commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "My" [master 8adf822] My
 1 file changed, 1 insertion(+)
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "name" [master 1eac43a] name
 1 file changed, 1 insertion(+), 1 deletion(-)
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "is" [master f23e5cb] is
 1 file changed, 1 insertion(+), 1 deletion(-)
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "Connor" [master 2ac1717] Connor
 1 file changed, 1 insertion(+), 1 deletion(-)
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git log -- hello.txt commit 2ac1717cdedf1dbc50efee9827148815217b2410 (HEAD -> master) Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:38 2020 -0800
    Connor
commit f23e5cbc427b8ba737281095913dbcab4cdb8105 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:12 2020 -0800
    is
commit 1eac43a81f31ae0e97c7415ecd3073ea32b6483c Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:00 2020 -0800
    name
commit 8adf8224c61f817062060521c78d152f5102eab4 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:31:37 2020 -0800
    My
commit 0b4aa96f14d5e75840a7cf69c1cd3a05acb465b2 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:31:09 2020 -0800
    commit
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git format-patch 8adf82 --stdout >changes.patch
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git tag -a v1 1eac43a -m "this is a tag"
F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git init Initialized empty Git repository in F:/School/2020 Fall/CS 174 - Web Programming/Exercises/.git/ F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "commit" [master (root-commit) 0b4aa96] commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "My" [master 8adf822] My 1 file changed, 1 insertion(+) F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "name" [master 1eac43a] name 1 file changed, 1 insertion(+), 1 deletion(-) F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "is" [master f23e5cb] is 1 file changed, 1 insertion(+), 1 deletion(-) F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git add hello.txt F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git commit -m "Connor" [master 2ac1717] Connor 1 file changed, 1 insertion(+), 1 deletion(-) F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git log -- hello.txt commit 2ac1717cdedf1dbc50efee9827148815217b2410 (HEAD -> master) Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:38 2020 -0800 Connor commit f23e5cbc427b8ba737281095913dbcab4cdb8105 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:12 2020 -0800 is commit 1eac43a81f31ae0e97c7415ecd3073ea32b6483c Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:32:00 2020 -0800 name commit 8adf8224c61f817062060521c78d152f5102eab4 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:31:37 2020 -0800 My commit 0b4aa96f14d5e75840a7cf69c1cd3a05acb465b2 Author: Connor Pietrasik <connorgpietrasik@gmail.com> Date: Mon Nov 2 13:31:09 2020 -0800 commit F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git format-patch 8adf82 --stdout >changes.patch F:\School\2020 Fall\CS 174 - Web Programming\Exercises>git tag -a v1 1eac43a -m "this is a tag" ((resource:changes.patch|Resource Description for changes.patch))
2020-11-04

-- Oct 28 In-Class Exercise Thread
Sachins-MBP-3:patch_test sachinshah$ git checkout new_branch M hello.txt Switched to branch 'new_branch' (base) Sachins-MBP-3:patch_test sachinshah$ ls hello.txt (base) Sachins-MBP-3:patch_test sachinshah$ git status On branch new_branch Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   hello.txt
no changes added to commit (use "git add" and/or "git commit -a") (base) Sachins-MBP-3:patch_test sachinshah$ git add * (base) Sachins-MBP-3:patch_test sachinshah$ git commit -m "3rd commit" [new_branch 6c9c372] 3rd commit
 1 file changed, 1 insertion(+), 1 deletion(-)
(base) Sachins-MBP-3:patch_test sachinshah$ cat >hello.txt hello my name is Sachin ^C (base) Sachins-MBP-3:patch_test sachinshah$ git add * (base) Sachins-MBP-3:patch_test sachinshah$ git commit -m "4th commit" [new_branch fe44b72] 4th commit
 1 file changed, 1 insertion(+), 1 deletion(-)
(base) Sachins-MBP-3:patch_test sachinshah$ git format-patch master --stdout > mychanges.patch (base) Sachins-MBP-3:patch_test sachinshah$ ls hello.txt mychanges.patch (base) Sachins-MBP-3:patch_test sachinshah$ cat mychanges.patch From 6c9c372e5a696b524e8d64362bb9f265e062a2b8 Mon Sep 17 00:00:00 2001 From: Sachin <sachin.shah@sjsu.edu> Date: Wed, 4 Nov 2020 12:57:35 -0800 Subject: [PATCH 1/2] 3rd commit
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index a47d230..3ec7826 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -hello my +hello my name is -- 2.28.0
From fe44b7207f346026431b95f2dd024483d252311f Mon Sep 17 00:00:00 2001 From: Sachin <sachin.shah@sjsu.edu> Date: Wed, 4 Nov 2020 12:58:13 -0800 Subject: [PATCH 2/2] 4th commit
---
 hello.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hello.txt b/hello.txt index 3ec7826..7887d1b 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -hello my name is +hello my name is Sachin -- 2.28.0
Sachins-MBP-3:patch_test sachinshah$ git checkout new_branch M hello.txt Switched to branch 'new_branch' (base) Sachins-MBP-3:patch_test sachinshah$ ls hello.txt (base) Sachins-MBP-3:patch_test sachinshah$ git status On branch new_branch Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: hello.txt no changes added to commit (use "git add" and/or "git commit -a") (base) Sachins-MBP-3:patch_test sachinshah$ git add * (base) Sachins-MBP-3:patch_test sachinshah$ git commit -m "3rd commit" [new_branch 6c9c372] 3rd commit 1 file changed, 1 insertion(+), 1 deletion(-) (base) Sachins-MBP-3:patch_test sachinshah$ cat >hello.txt hello my name is Sachin ^C (base) Sachins-MBP-3:patch_test sachinshah$ git add * (base) Sachins-MBP-3:patch_test sachinshah$ git commit -m "4th commit" [new_branch fe44b72] 4th commit 1 file changed, 1 insertion(+), 1 deletion(-) (base) Sachins-MBP-3:patch_test sachinshah$ git format-patch master --stdout > mychanges.patch (base) Sachins-MBP-3:patch_test sachinshah$ ls hello.txt mychanges.patch (base) Sachins-MBP-3:patch_test sachinshah$ cat mychanges.patch From 6c9c372e5a696b524e8d64362bb9f265e062a2b8 Mon Sep 17 00:00:00 2001 From: Sachin <sachin.shah@sjsu.edu> Date: Wed, 4 Nov 2020 12:57:35 -0800 Subject: [PATCH 1/2] 3rd commit --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index a47d230..3ec7826 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -hello my +hello my name is -- 2.28.0 From fe44b7207f346026431b95f2dd024483d252311f Mon Sep 17 00:00:00 2001 From: Sachin <sachin.shah@sjsu.edu> Date: Wed, 4 Nov 2020 12:58:13 -0800 Subject: [PATCH 2/2] 4th commit --- hello.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index 3ec7826..7887d1b 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -hello my name is +hello my name is Sachin -- 2.28.0
X