Updated MD file
@ -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 -p -- filename.extension
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## git log --oneline -- filename.extension
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
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 -L 1,5 -- filename.extension
|
||||
|
||||

|
||||
|
||||
## git blame -e -- filename.extension
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
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
|
||||
|
1
git clone gokul/git-practice-Gokul
Submodule
BIN
git_bame_L.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
git_blame.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
git_blame_e.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
git_log_example.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
git_log_example_oneline.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
git_log_example_p1.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
git_log_example_p2.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
git_log_example_p3.png
Normal file
After Width: | Height: | Size: 23 KiB |