Post your solutions to the Oct 28 In-Class Exercise to this thread.
Best,
Chris
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder $ git init Initialized empty Git repository in C:/Users/chris/Desktop/New folder/.git/
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ nano hello.txt
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git add hello.txt warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git commit -m "In Class Exercise" [master (root-commit) 13bc375] In Class Exercise 1 file changed, 1 insertion(+) create mode 100644 hello.txt
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git log commit 13bc375c80504499e4e7f14edd7fc3c3b1f315eb (HEAD -> master) Author: Christopher Douglas <> Date: Wed Oct 28 15:29:54 2020 -0700
In Class Exercise
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ nano hello.txt
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git add hello.txt warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git commit -m "commit2" [master 1eddaa4] commit2 1 file changed, 2 insertions(+)
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git log commit 1eddaa40b9f0dbd2468d400b83fb0e625adffa50 (HEAD -> master) Author: Christopher Douglas <> Date: Wed Oct 28 15:34:24 2020 -0700
commit2
commit 13bc375c80504499e4e7f14edd7fc3c3b1f315eb Author: Christopher Douglas <> Date: Wed Oct 28 15:29:54 2020 -0700
In Class Exercise
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git format-patch 13bc375 1eddaa 0001-In-Class-Exercise.patch 0002-commit2.patch
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ nano hello.txt
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git add hello.txt warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git tag -a v0.0.1 -m "i just want to sleep"
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git commit -m "pls work" [master b6bd4cf] pls work 1 file changed, 1 insertion(+)
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git log commit b6bd4cfba30944c8492d1d25ec9a68fd22ea99cd (HEAD -> master) Author: Christopher Douglas <> Date: Wed Oct 28 15:38:17 2020 -0700
pls work
commit 1eddaa40b9f0dbd2468d400b83fb0e625adffa50 (tag: v0.0.1) Author: Christopher Douglas <> Date: Wed Oct 28 15:34:24 2020 -0700
commit2
commit 13bc375c80504499e4e7f14edd7fc3c3b1f315eb Author: Christopher Douglas <> Date: Wed Oct 28 15:29:54 2020 -0700
In Class Exercise
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $ git format-patch 1eddaa b6bd4c 0001-In-Class-Exercise.patch 0002-commit2.patch 0003-pls-work.patch
chris@DESKTOP-A5C0CPT MINGW64 ~/Desktop/New folder (master) $
mymac:mysecondrepo razaghulam git init
Initialized empty Git repository in /Users/razaghulam/Desktop/myrepo/mysecondrepo/.git/
mymac:mysecondrepo razaghulam touch hello.txt
mymac:mysecondrepo razaghulam subl hello.txt
mymac:mysecondrepo razaghulam cat hello.txt
Hello my name is Razamymac:mysecondrepo razaghulam
mymac:mysecondrepo razaghulam git status
On branch master
No commits yet
Untracked files: (use "git add <file>..." to include in what will be committed)
hello.txt
nothing added to commit but untracked files present (use "git add" to track)
mymac:mysecondrepo razaghulam git add .
mymac:mysecondrepo razaghulam git status
On branch master
No commits yet
Changes to be committed: (use "git rm --cached <file>..." to unstage)
new file: hello.txt
mymac:mysecondrepo razaghulam git commit -m "file modified"
[master (root-commit) 1995bc6] file modified
1 file changed, 1 insertion(+)
create mode 100644 hello.txt
mymac:mysecondrepo razaghulam git status
On branch master
nothing to commit, working tree clean
mymac:mysecondrepo razaghulam$ git log
commit 1995bc638f266047fa3d5c1fae861a5c97adcc48 (HEAD -> master)
Author: Raza Ghulam <ahmad.abdali001@gmail.com>
Date: Wed Oct 28 15:37:07 2020 -0700
file modified
mymac:mysecondrepo razaghulam pico hello.txt
mymac:mysecondrepo razaghulam git status
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: hello.txt
no changes added to commit (use "git add" and/or "git commit -a")
mymac:mysecondrepo razaghulam git add .
mymac:mysecondrepo razaghulam git commit -m "further modified"
[master f677d38] further modified
1 file changed, 2 insertions(+), 1 deletion(-)
mymac:mysecondrepo razaghulam$ git log
commit f677d38b121489c037ee747c69eac832d48fb8f4 (HEAD -> master)
Author: Raza Ghulam <ahmad.abdali001@gmail.com>
Date: Wed Oct 28 15:37:59 2020 -0700
further modified
commit 1995bc638f266047fa3d5c1fae861a5c97adcc48 Author: Raza Ghulam <ahmad.abdali001@gmail.com> Date: Wed Oct 28 15:37:07 2020 -0700
file modified
mymac:mysecondrepo razaghulam git format-patch 1995bc6
0001-further-modified.patch
mymac:mysecondrepo razaghulam cat 0001-further-modified.patch
From f677d38b121489c037ee747c69eac832d48fb8f4 Mon Sep 17 00:00:00 2001
From: Raza Ghulam <ahmad.abdali001@gmail.com>
Date: Wed, 28 Oct 2020 15:37:59 -0700
Subject: [PATCH] further modified
hello.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
2.22.0
mymac:mysecondrepo razaghulam$ git log commit f677d38b121489c037ee747c69eac832d48fb8f4 (HEAD -> master) Author: Raza Ghulam <ahmad.abdali001@gmail.com> Date: Wed Oct 28 15:37:59 2020 -0700
further modified
commit 1995bc638f266047fa3d5c1fae861a5c97adcc48 Author: Raza Ghulam <ahmad.abdali001@gmail.com> Date: Wed Oct 28 15:37:07 2020 -0700
file modified
mymac:mysecondrepo razaghulam git tag -a version2 1995bc6
hint: Waiting for your editor to close the file...
[1]+ Stopped(SIGTSTP) git tag -a version2 1995bc6
mymac:mysecondrepo razaghulam git tag -a version2 1995bc6
hint: Waiting for your editor to close the file... error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
mymac:mysecondrepo razaghulam$ git log
commit f677d38b121489c037ee747c69eac832d48fb8f4 (HEAD -> master)
Author: Raza Ghulam <ahmad.abdali001@gmail.com>
Date: Wed Oct 28 15:37:59 2020 -0700
further modified
commit 1995bc638f266047fa3d5c1fae861a5c97adcc48 Author: Raza Ghulam <ahmad.abdali001@gmail.com> Date: Wed Oct 28 15:37:07 2020 -0700
(Edited: 2020-10-28)Click on image to see the whole session.
Resource Description for my.patch
PS C:\Users\tkgla\Documents\myrepos> git commit -a -m "Initial commit" [master (root-commit) 644a745] Initial commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt PS C:\Users\tkgla\Documents\myrepos> git add hello.txt PS C:\Users\tkgla\Documents\myrepos> git commit -a -m "hello.txt added" [master a3ed58b] hello.txt added 1 file changed, 1 insertion(+) create mode 100644 hello.txt PS C:\Users\tkgla\Documents\myrepos> git format-patch rev1 rev2 fatal: ambiguous argument 'rev1': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' PS C:\Users\tkgla\Documents\myrepos> git format-patch PS C:\Users\tkgla\Documents\myrepos> git log commit a3ed58b4ba48f146df78922dfbc38e5baabaa843 (HEAD -> master) Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:33:04 2020 -0700
hello.txt added
commit 644a7454bd0de43190a5f556c05ae3bc4a00fda9 Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:31:29 2020 -0700
Initial commit
PS C:\Users\tkgla\Documents\myrepos> git format-patch master PS C:\Users\tkgla\Documents\myrepos> git format-patch master --stdout > mytest.patch PS C:\Users\tkgla\Documents\myrepos> git format-patch master 644a7454bd0de43190a5f556c05ae3bc4a00fda9 > mytest.patch PS C:\Users\tkgla\Documents\myrepos> git tag -a v1 644a7454bd0de43190a5f556c05ae3bc4a00fda9 -m "Made version 1" PS C:\Users\tkgla\Documents\myrepos> git tag -l v1 PS C:\Users\tkgla\Documents\myrepos> git log commit a3ed58b4ba48f146df78922dfbc38e5baabaa843 (HEAD -> master) Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:33:04 2020 -0700
hello.txt added
commit 644a7454bd0de43190a5f556c05ae3bc4a00fda9 (tag: v1) Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:31:29 2020 -0700
Initial commit
PS C:\Users\tkgla\Documents\myrepos> 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
Untracked files: (use "git add <file>..." to include in what will be committed) 0001-Initial-commit.patch 0002-hello.txt-added.patch mytest.patch
no changes added to commit (use "git add" and/or "git commit -a") PS C:\Users\tkgla\Documents\myrepos> git add hello.txt PS C:\Users\tkgla\Documents\myrepos> git commit -a -m "changed hello.txt: >> " [master 2e73f4b] changed hello.txt: 1 file changed, 2 insertions(+), 1 deletion(-) PS C:\Users\tkgla\Documents\myrepos> git log commit 2e73f4b28ea45710a2e0939bbd2df8fbd54b55a6 (HEAD -> master) Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:46:12 2020 -0700
changed hello.txt:
commit a3ed58b4ba48f146df78922dfbc38e5baabaa843 Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:33:04 2020 -0700
hello.txt added
commit 644a7454bd0de43190a5f556c05ae3bc4a00fda9 (tag: v1) Author: Trevor Glassey <tkglassey@gmail.com> Date: Wed Oct 28 15:31:29 2020 -0700
Initial commit
PS C:\Users\tkgla\Documents\myrepos> git format-patch master 644a7454bd0de43190a5f556c05ae3bc4a00fda9 > mytest.patch PS C:\Users\tkgla\Documents\myrepos> git format-patch 644a7454bd0de43190a5f556c05ae3bc4a00fda9 --stdout > mytest.patch PS C:\Users\tkgla\Documents\myrepos> git tag -a v2 a3ed58b4ba48f146df78922dfbc38e5baabaa843 -m "Made version 1" PS C:\Users\tkgla\Documents\myrepos> git tag -l v1 v2 PS C:\Users\tkgla\Documents\myrepos> Resource Description for mytest.patch
ubuntu@vps-1a3e78d2:~/cs174zl$ git log commit 8fbaa35ab3ded00a73b1d9289ab656ca84e7e16d (HEAD -> master) Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:51:40 2020 +0000
n
commit 57b8bd0f5768375fc3070b180b05e024ebde50fa Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:51:24 2020 +0000
i
commit 89986fecca6eb530b4b8bcfda3b9f3b3595ee0cd Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:50:42 2020 +0000
L
commit 9de5a3c5e353647b5125cf44f9fb96d0c023db49 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:50:28 2020 +0000
o
commit 28c1f3359d7cb01aba4e50bf277c49f61a7477c1 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:50:14 2020 +0000
a
commit 37a902f5b7030761b318188e479d23278bf58e83 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:49:46 2020 +0000
h
commit d2fced7caa7f15203cdfa049ca4275b8f03dbc28 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:49:32 2020 +0000
i
commit 3092fb672c6e730b0b4276e95844a0e5485e80a3 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:49:16 2020 +0000
Z
commit 8e3697e76fee3b639ba4827b5a86706f5b9f5a51 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:49:02 2020 +0000
:
commit 9323405d6ea878f9d73ba079461f9403ac410511 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:48:38 2020 +0000
s
commit a5c5b183118b859f3e23c0cbe054efa14fccf0f3 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:48:23 2020 +0000
i
commit 207ecd0ab800cc6b7a01bff68bcf6fff976020c2 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:48:03 2020 +0000
e
commit d545ceff0c3ace6d3e82c86a25669f36636684a7 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:47:43 2020 +0000
a
commit d161b07a7b5982d731927364bd816ddcd4871ac0 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:46:20 2020 +0000
a
commit 6f3e0238a6924410bfc0ba58a2de4eb00d68bdd3 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:46:01 2020 +0000
n
commit 8d32a03fd966df8a35b2d3914854b6f1dfd7428c Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:45:44 2020 +0000
y
commit d33443fb5acbb9f6dd1ddb216527f7a01710b647 Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:45:09 2020 +0000
m
commit 25ea585c984dabf39dd7bd3212c9bf5d5296649f Author: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed Oct 28 22:44:45 2020 +0000
init
ubuntu@vps-1a3e78d2:/cs174zl$ git format-patch -2 25ea585c984dabf39dd7bd3212c9bf5d5296649f
0001-init.patch
ubuntu@vps-1a3e78d2:/cs174zl git tag v1
ubuntu@vps-1a3e78d2:~/cs174zl git tag v1
fatal: tag 'v1' already exists
ubuntu@vps-1a3e78d2:/cs174zl$ git tag
v1
ubuntu@vps-1a3e78d2:/cs174zl vim 0001-init-hello.patch
ubuntu@vps-1a3e78d2:~/cs174zl vim 0001-init.patch
From 25ea585c984dabf39dd7bd3212c9bf5d5296649f Mon Sep 17 00:00:00 2001 From: Ubuntu <ubuntu@vps-1a3e78d2.vps.ovh.us> Date: Wed, 28 Oct 2020 22:44:45 +0000 Subject: [PATCH] init
hello.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hello.txt
2.25.1
~
~
~
~
~
~
~
~
~
~
~
"0001-init.patch" 16L, 368C 1,1 All
kynan@NepPC MINGW64 ~ $ mkdir "inclass_10_28"
kynan@NepPC MINGW64 ~ $ cd "inclass_10_28"
kynan@NepPC MINGW64 ~/inclass_10_28 $ git init Initialized empty Git repository in C:/Users/kynan/inclass_10_28/.git/
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git add .
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ echo My > hello.txt
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git add hello.txt warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git commit -a -m "initial commit" [master (root-commit) 29cee0a] initial commit 1 file changed, 1 insertion(+) create mode 100644 hello.txt
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ echo My name > hello.txt
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git log commit 29cee0a4dd4183c08fd986b32439cb6ba176ec72 (HEAD -> master) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:57:19 2020 -0700
initial commit
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git commit -a -m "2nd commit" warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory [master 05ee667] 2nd commit 1 file changed, 1 insertion(+), 1 deletion(-)
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git log commit 05ee667eaf9926d83d845e35706e49d6fe84ffd7 (HEAD -> master) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:59:34 2020 -0700
2nd commit
commit 29cee0a4dd4183c08fd986b32439cb6ba176ec72 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:57:19 2020 -0700
initial commit
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git format-patch 05ee667 --stdout >my.patch
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git apply --check mu.patch error: can't open patch 'mu.patch': No such file or directory
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git apply --check my.patch error: unrecognized input
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ echo My name is: > hello.txt
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git commit -a -m "3rd commit" warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory [master b460182] 3rd commit 1 file changed, 1 insertion(+), 1 deletion(-)
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ log bash: log: command not found
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git log commit b46018202091c9ce9221c31ec8373f577a9ba03e (HEAD -> master) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 16:02:27 2020 -0700
3rd commit
commit 05ee667eaf9926d83d845e35706e49d6fe84ffd7 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:59:34 2020 -0700
2nd commit
commit 29cee0a4dd4183c08fd986b32439cb6ba176ec72 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:57:19 2020 -0700
initial commit
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git tag -a v3 b460182 -m "version3"
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ echo My name is: Kynan > hello.txt
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git commit -a -m "4th commit" warning: LF will be replaced by CRLF in hello.txt. The file will have its original line endings in your working directory [master 94e1775] 4th commit 1 file changed, 1 insertion(+), 1 deletion(-)
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git log commit 94e1775ad435d993f2659a99e4b1d03fd69f40a4 (HEAD -> master) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 16:04:26 2020 -0700
4th commit
commit b46018202091c9ce9221c31ec8373f577a9ba03e (tag: v3) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 16:02:27 2020 -0700
3rd commit
commit 05ee667eaf9926d83d845e35706e49d6fe84ffd7 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:59:34 2020 -0700
2nd commit
commit 29cee0a4dd4183c08fd986b32439cb6ba176ec72 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:57:19 2020 -0700
initial commit
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git apply --check my.patch error: unrecognized input
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ Get-Content .\fix.patch | Set-Content -Encoding utf8 fix_utf8.patch bash: Get-Content: command not found bash: Set-Content: command not found
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git apply --check my.patch error: unrecognized input
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git apply --check my.patch error: unrecognized input
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git log commit 94e1775ad435d993f2659a99e4b1d03fd69f40a4 (HEAD -> master) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 16:04:26 2020 -0700
4th commit
commit b46018202091c9ce9221c31ec8373f577a9ba03e (tag: v3) Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 16:02:27 2020 -0700
3rd commit
commit 05ee667eaf9926d83d845e35706e49d6fe84ffd7 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:59:34 2020 -0700
2nd commit
commit 29cee0a4dd4183c08fd986b32439cb6ba176ec72 Author: Kynan Hui <kynan.hui@sjsu.edu> Date: Wed Oct 28 15:57:19 2020 -0700
initial commit
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git format-patch --no--color 05ee667 --stdout >my.patch fatal: unrecognized argument: --no--color
kynan@NepPC MINGW64 ~/inclass_10_28 (master) $ git format-patch --no-color 05ee667 --stdout > my.patch
Georges-MacBook:~ georgemichaelcuevas cd ~/Desktop
Georges-MacBook:Desktop georgemichaelcuevas mkdir cs174
mkdir: cs174: File exists
Georges-MacBook:Desktop georgemichaelcuevas cd cs174/
Georges-MacBook:cs174 georgemichaelcuevas git init
Initialized empty Git repository in /Users/georgemichaelcuevas/Desktop/cs174/.git/
Georges-MacBook:cs174 georgemichaelcuevas$ git status
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
Georges-MacBook:cs174 georgemichaelcuevas touch hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
No commits yet
Untracked files: (use "git add <file>..." to include in what will be committed)
hello.txt
nothing added to commit but untracked files present (use "git add" to track)
Georges-MacBook:cs174 georgemichaelcuevas git add hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
No commits yet
Changes to be committed: (use "git rm --cached <file>..." to unstage)
new file: hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "Initial commit"
[master (root-commit) e330ef4] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
nothing to commit, working tree clean
Georges-MacBook:cs174 georgemichaelcuevas$ git status
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: hello.txt
no changes added to commit (use "git add" and/or "git commit -a")
Georges-MacBook:cs174 georgemichaelcuevas git add hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git stauts
git: 'stauts' is not a git command. See 'git --help'.
The most similar command is status Georges-MacBook:cs174 georgemichaelcuevas$ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage)
modified: hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "file modified"
[master ec9582c] file modified
1 file changed, 1 insertion(+)
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
nothing to commit, working tree clean
Georges-MacBook:cs174 georgemichaelcuevas$ git log
commit ec9582c6635d71861b4dae6c7665e5a961bc4aa3 (HEAD -> master)
Author: George M Cuevas <george.cuevas-garcia@sjsu.edu>
Date: Wed Oct 28 16:26:39 2020 -0700
file modified
commit e330ef4d908dfce0ef06319af7a1584cc19c6d0b Author: George M Cuevas <george.cuevas-garcia@sjsu.edu> Date: Wed Oct 28 16:23:59 2020 -0700
Initial commit
Georges-MacBook:cs174 georgemichaelcuevas$ git status 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: hello.txt
no changes added to commit (use "git add" and/or "git commit -a")
Georges-MacBook:cs174 georgemichaelcuevas git commit -a "second mod"
fatal: Paths with -a does not make sense.
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "second mod"
On branch master
Changes not staged for commit:
modified: hello.txt
no changes added to commit
Georges-MacBook:cs174 georgemichaelcuevas git add hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "second mod"
[master 70507f4] second mod
1 file changed, 1 insertion(+), 1 deletion(-)
Georges-MacBook:cs174 georgemichaelcuevas git status
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: hello.txt
no changes added to commit (use "git add" and/or "git commit -a")
Georges-MacBook:cs174 georgemichaelcuevas git add hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "third commit"
[master 3e13ab2] third commit
1 file changed, 1 insertion(+), 1 deletion(-)
Georges-MacBook:cs174 georgemichaelcuevas git status
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: hello.txt
no changes added to commit (use "git add" and/or "git commit -a")
Georges-MacBook:cs174 georgemichaelcuevas git add hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: hello.txt
Georges-MacBook:cs174 georgemichaelcuevas git commit -m "modified again"
[master 0a27ba8] modified again
1 file changed, 1 insertion(+), 1 deletion(-)
Georges-MacBook:cs174 georgemichaelcuevas git log
commit 0a27ba8252096e2a1eafd28500d00bfa95548a5a (HEAD -> master)
Author: George M Cuevas <george.cuevas-garcia@sjsu.edu>
Date: Wed Oct 28 16:32:50 2020 -0700
modified again
commit 3e13ab231382e44f3cdd9f496f9a268e227bcf77 Author: George M Cuevas <george.cuevas-garcia@sjsu.edu> Date: Wed Oct 28 16:30:09 2020 -0700
third commit
commit 70507f4b8dce215ccb912959f7edd8d0bc4b5083 Author: George M Cuevas <george.cuevas-garcia@sjsu.edu> Date: Wed Oct 28 16:29:06 2020 -0700
second mod
commit ec9582c6635d71861b4dae6c7665e5a961bc4aa3 Author: George M Cuevas <george.cuevas-garcia@sjsu.edu> Date: Wed Oct 28 16:26:39 2020 -0700
file modified
ESCOD Author: George M Cuevas <george.cuevas-garcia@sjsu.edu> Date: Wed Oct 28 16:32:50 2020 -0700
modified again
Georges-MacBook:cs174 georgemichaelcuevas$ git format-patch ec9582c6635d71861b4dae6c7665e5a961bc4aa3 0001-second-mod.patch 0002-third-commit.patch 0003-modified-again.patch
(Edited: 2020-10-28)