diff --git a/GIT_ASSIGNMENT.md b/GIT_ASSIGNMENT.md index 51f0182..ad1a3ce 100644 --- a/GIT_ASSIGNMENT.md +++ b/GIT_ASSIGNMENT.md @@ -137,3 +137,53 @@ Version control (like Git) keeps one central version of the file, records who ma --- +## Part 1: Viewing File History + +## git log -- filename.extension + +![.git log -- example.txt](git_log_example.png) + +## git log -p -- filename.extension + +![git log -p](git_log_example_p1.png) +![git log -p](git_log_example_p2.png) +![git log -p](git_log_example_p3.png) + +## git log --oneline -- filename.extension + +![git log --oneline](git_log_example_oneline.png) + +--- + +How many commits modified this file? +5 + +What differences do you see when adding the -p option? +It shows the detailed changes made to the file during the commit + +--- + +## Part 2: Viewing File History with Blame + +## git blame -- filename.extension + +![.git blame -- assignment.txt](git_blame.png) + +## git blame -L 1,5 -- filename.extension + +![git blame -L 1,5](git_bame_L.png) + +## git blame -e -- filename.extension + +![git blame -e](git_blame_e.png) + +--- + +Who changed each line of the file? +Gokul + +How does -L help when the file is large? +It acts as a selection area to select the lines between the given numbers + +What extra information does -e provide? +It shows the commiters email id diff --git a/git clone gokul/git-practice-Gokul b/git clone gokul/git-practice-Gokul new file mode 160000 index 0000000..b88b3e4 --- /dev/null +++ b/git clone gokul/git-practice-Gokul @@ -0,0 +1 @@ +Subproject commit b88b3e4605d3d59c73069876db065ba48bf1b939 diff --git a/git_bame_L.png b/git_bame_L.png new file mode 100644 index 0000000..2a4f07a Binary files /dev/null and b/git_bame_L.png differ diff --git a/git_blame.png b/git_blame.png new file mode 100644 index 0000000..d4bd511 Binary files /dev/null and b/git_blame.png differ diff --git a/git_blame_e.png b/git_blame_e.png new file mode 100644 index 0000000..1e0b0b5 Binary files /dev/null and b/git_blame_e.png differ diff --git a/git_log_example.png b/git_log_example.png new file mode 100644 index 0000000..2834e2b Binary files /dev/null and b/git_log_example.png differ diff --git a/git_log_example_oneline.png b/git_log_example_oneline.png new file mode 100644 index 0000000..b760930 Binary files /dev/null and b/git_log_example_oneline.png differ diff --git a/git_log_example_p1.png b/git_log_example_p1.png new file mode 100644 index 0000000..7432538 Binary files /dev/null and b/git_log_example_p1.png differ diff --git a/git_log_example_p2.png b/git_log_example_p2.png new file mode 100644 index 0000000..ec3bafe Binary files /dev/null and b/git_log_example_p2.png differ diff --git a/git_log_example_p3.png b/git_log_example_p3.png new file mode 100644 index 0000000..63c2e1a Binary files /dev/null and b/git_log_example_p3.png differ