Compare commits

7 Commits

Author SHA1 Message Date
358429e989 ASSIGNMENT-04-09-2025.md 2025-09-11 11:08:45 +05:30
10d570e1c2 Merge branch 'feature/feature-1' 2025-09-11 10:46:47 +05:30
8a00f27087 part 3 assignment 2025-09-11 10:43:40 +05:30
0c86dd9bd6 Part 3: Merging Branches 2025-09-11 10:31:59 +05:30
3af9867338 readme file 2025-09-04 00:09:06 +05:30
fd2d1f7eb5 git ignore screenshot update 2025-09-03 23:55:18 +05:30
95c4c8b3ee git file removed 2025-09-03 23:49:36 +05:30
15 changed files with 160 additions and 1 deletions

79
ASSIGNMENT-04-09-2025.md Normal file
View File

@ -0,0 +1,79 @@
## Part 1: Viewing File History
## git log -- filename.extension
![.git log -- example.txt](git-log--.png)
## git log -p -- filename.extension
![git log -p](git_log_p_example.txt.png)
## git log --oneline -- filename.extension
![git log --oneline](git_log_oneline_example.txt.png)
---
How many commits modified this file?
3
What differences do you see when adding the -p option?
It describes what changed — which lines were added (+), which lines were removed ()
---
## Part 2: Viewing File History with Blame
## git blame -- filename.extension
![.git blame -- assignment.txt](git_blame_example.txt.png)
## git blame -L 1,5 -- filename.extension
![git blame -L 1,5](git_blame_L_1_5_example.png)
## git blame -e -- filename.extension
![git blame -e](git_blame_e_example.png)
---
Who changed each line of the file?
Arjun,Renejit, Arjun, Arjun
ec0f5f8e (Arjun G 2025-09-10 23:41:01 +0530 1) Tech Thursday assignment 3 updated
ae37ccf5 (Renejit 2025-09-10 16:29:53 +0530 2) date 10-09-2025
f97b76b3 (Arjun G 2025-09-11 00:00:58 +0530 3) wednesday
dc7fc330 (Arjun G 2025-09-11 00:01:50 +0530 4) Practise session extended to Thursday
How does -L help when the file is large?
Limits the blame output to just a range of lines when the file is large.
What extra information does -e provide?
Author email
---
## Part 3: Merging Branches
## git checkout -b feature/feature-1
![git checkout -b feature/feature-1](git_checkout_feature_blame.png)
## git merge feature/feature-1
![git merge feature/feature-1](git_merge_main.png)
## git log --graph --oneline --all
![git log --graph --oneline --all](git_log_after_merge.png)
---
Did Git perform a fast-forward merge or a 3-way merge?
3 way merge
What does git log --graph --oneline --all show after the merge?
shows a merge commit (06f4ad1) at the top.
The graph shows two diverging branches (main & feature/feature-1) and how they were joined together.
main now contains all changes from both histories.

View File

@ -128,4 +128,83 @@ Emailing creates many confusing copies (e.g., report_final.docx, report_final2.d
![.gitignore](git_ignore_commit.png)
![.gitignore](git_ignore_status.png)
---
---
## Part 1: Viewing File History
## git log -- filename.extension
![.git log -- example.txt](git-log--.png)
## git log -p -- filename.extension
![git log -p](git_log_p_example.txt.png)
## git log --oneline -- filename.extension
![git log --oneline](git_log_oneline_example.txt.png)
---
How many commits modified this file?
3
What differences do you see when adding the -p option?
It describes what changed — which lines were added (+), which lines were removed ()
---
## Part 2: Viewing File History with Blame
## git blame -- filename.extension
![.git blame -- assignment.txt](git_blame_example.txt.png)
## git blame -L 1,5 -- filename.extension
![git blame -L 1,5](git_blame_L_1_5_example.png)
## git blame -e -- filename.extension
![git blame -e](git_blame_e_example.png)
---
Who changed each line of the file?
Arjun,Renejit, Arjun, Arjun
ec0f5f8e (Arjun G 2025-09-10 23:41:01 +0530 1) Tech Thursday assignment 3 updated
ae37ccf5 (Renejit 2025-09-10 16:29:53 +0530 2) date 10-09-2025
f97b76b3 (Arjun G 2025-09-11 00:00:58 +0530 3) wednesday
dc7fc330 (Arjun G 2025-09-11 00:01:50 +0530 4) Practise session extended to Thursday
How does -L help when the file is large?
Limits the blame output to just a range of lines when the file is large.
What extra information does -e provide?
Author email
---
## Part 3: Merging Branches
## git checkout -b feature/feature-1
![git checkout -b feature/feature-1](git_checkout_feature_blame.png)
## git merge feature/feature-1
![git merge feature/feature-1](git_merge_main.png)
## git log --graph --oneline --all
![git log --graph --oneline --all](git_log_after_merge.png)
---
Did Git perform a fast-forward merge or a 3-way merge?
3 way merge
What does git log --graph --oneline --all show after the merge?
shows a merge commit (06f4ad1) at the top.
The graph shows two diverging branches (main & feature/feature-1) and how they were joined together.
main now contains all changes from both histories.

BIN
after_gitignore.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
before_git_ignore.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
git-log--.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
git_blame_L_1_5_example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
git_blame_e_example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
git_blame_example.txt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
git_log_after_merge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
git_log_p_example.txt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
git_merge_main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

1
readme.md Normal file
View File

@ -0,0 +1 @@
ddd

0
secret.txt Normal file
View File