Compare commits
16 Commits
feature/le
...
main
Author | SHA1 | Date | |
---|---|---|---|
c87ff0ff92 | |||
9657a1ec1c | |||
2912e22546 | |||
1d23dbc319 | |||
33ab345ffc | |||
63e67802a8 | |||
36e4019ced | |||
1da6f094d0 | |||
19a309af94 | |||
24faea97fe | |||
6be5cb4f32 | |||
df394da8e2 | |||
7e2c7a9396 | |||
e2914f3b70 | |||
d0c1a1730e | |||
6f6d069366 |
76
ASSIGNMENT-04-09-2025.md
Normal file
@ -0,0 +1,76 @@
|
||||
## Viewing File History
|
||||
|
||||
## 1. git log -- assignment.txt
|
||||
|
||||
|
||||

|
||||
|
||||
## 2. git log -p -- assignment.txt
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 3. git log --oneline -- assignment.txt
|
||||
|
||||

|
||||
|
||||
## How many commits modified this file?
|
||||
|
||||
3 commits
|
||||
|
||||
## What differences do you see when adding the -p option?
|
||||
|
||||
Shows detailed changes for each commit in the file.
|
||||
|
||||
## Viewing File History with Blame
|
||||
|
||||
## 1. git blame assignment.txt
|
||||
|
||||

|
||||
|
||||
## 2. git blame -L 1,5 assignment.txt
|
||||
|
||||

|
||||
|
||||
## 3. git blame assignment.txt
|
||||
|
||||

|
||||
|
||||
## Who changed each line of the file?
|
||||
Renejit
|
||||
|
||||
## How does -L help when the file is large?
|
||||
To view the history of specific lines in a file.
|
||||
|
||||
## What extra information does -e provide?
|
||||
To get the email id of the user who made the chages in the file.
|
||||
|
||||
## Merging Branches
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Merge Conflict
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Did Git perform a fast-forward merge or a 3-way merge?
|
||||
|
||||
Perform fast-forward merge and merge conflict
|
||||
|
||||
## What does git log --graph --oneline --all show after the merge?
|
||||
|
||||

|
||||
|
||||
## git log --graph --oneline --all after Merge conflict
|
||||
|
||||

|
||||
|
||||
|
||||
|
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
## why Git is not tracking this case-only rename?
|
||||
|
||||
Windows/macOS filesystems are case-insensitive they treat both names as the same file.So when you rename only by case, the OS reports no change.
|
||||
|
||||
## Provide the correct steps to make Git recognize and commit the rename:
|
||||
force Rename command : git mv -f readme.md Readme.md
|
||||
|
||||
## Explain the underlying reason why this happens (hint: think about how Git interacts with different operating systems and filesystems).
|
||||
|
||||
1. Git was designed for Linux, where filesystems are case-sensitive.
|
||||
2. Windows/macOS filesystems are case-insensitive they treat both names as the same file.So when you rename only by case, the OS reports no change.
|
||||
|
||||
|
||||
|
BIN
add number in main and training branch.png
Normal file
After Width: | Height: | Size: 56 KiB |
9
assignment.txt
Normal file
@ -0,0 +1,9 @@
|
||||
git log -- <filename> :
|
||||
shows the commmit message for a specific file.
|
||||
|
||||
git log -p --<filename> :
|
||||
shows line by line changes for each commmit in a specific file
|
||||
|
||||
git log --oneline --<filename> :
|
||||
shows commit history in short form for the specific file
|
||||
|
BIN
fast-forward merge-1.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
fast-forward merge-2.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
git blame -L 1,5 assignment.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
git blame -e assignment.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
git blame assignment.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
git log graph oneline after merge conflict.png
Normal file
After Width: | Height: | Size: 127 KiB |
BIN
git log--filename.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
git log--graph--oneline--all.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
git log--oneline--filename.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
git log-p--filename.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
git log-p--filename1.png
Normal file
After Width: | Height: | Size: 51 KiB |
1
git-practice-Renejit
Submodule
164
gitassignment.md
@ -1,83 +1,83 @@
|
||||
## Git Assignment
|
||||
## 1.Git Version Check
|
||||
|
||||
## what is git and version control
|
||||
Version Control:
|
||||
|
||||
Version control is a system used to record and manage changes made to files or code over time. It helps you to:
|
||||
Keep track of modifications: Identify what was changed, when it was changed, and who made the changes.
|
||||
Recover from errors: Restore previous versions if something goes wrong.
|
||||
Git is a type of distributed version control system. Enable to work even without an internet
|
||||
connection and provide powerful tools for managing code changes.
|
||||
|
||||
## Real-life example where multiple people edit the same file:
|
||||
In a project many person can work a same project we can track who is making what changes are made so we use git to track the changes.
|
||||
|
||||
## Why is version control better than emailing files back and forth?
|
||||
In email we can`t tarck the changes in the code.But in git we track the changes like who make it,time and old version of code.
|
||||
|
||||
|
||||

|
||||
|
||||
## 2. Installing Git & Configuring User Info
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
## 3. Initializing a Repository
|
||||
|
||||

|
||||
|
||||
## 4.Working Directory, Staging, and Commits
|
||||
|
||||

|
||||
|
||||
## 5. Adding & Committing Files
|
||||
|
||||

|
||||

|
||||
|
||||
## 6. Viewing Commit Logs & Diffs
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 7. Creating & Switching Branches
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## 8 Git clone
|
||||
|
||||

|
||||
|
||||
## 9. Adding & Managing Remotes
|
||||
|
||||

|
||||
|
||||
## 10. Pushing & Pulling Changes
|
||||
|
||||

|
||||

|
||||
|
||||
## 11. Ignoring Files with .gitignore
|
||||
|
||||

|
||||
|
||||
Working Directory and staging:
|
||||
|
||||

|
||||
|
||||
Git status Before gitignore
|
||||
|
||||

|
||||
|
||||
Git status after gitignore
|
||||
|
||||
## Git Assignment
|
||||
## 1.Git Version Check
|
||||
|
||||
## what is git and version control
|
||||
Version Control:
|
||||
|
||||
Version control is a system used to record and manage changes made to files or code over time. It helps you to:
|
||||
Keep track of modifications: Identify what was changed, when it was changed, and who made the changes.
|
||||
Recover from errors: Restore previous versions if something goes wrong.
|
||||
Git is a type of distributed version control system. Enable to work even without an internet
|
||||
connection and provide powerful tools for managing code changes.
|
||||
|
||||
## Real-life example where multiple people edit the same file:
|
||||
In a project many person can work a same project we can track who is making what changes are made so we use git to track the changes.
|
||||
|
||||
## Why is version control better than emailing files back and forth?
|
||||
In email we can`t tarck the changes in the code.But in git we track the changes like who make it,time and old version of code.
|
||||
|
||||
|
||||

|
||||
|
||||
## 2. Installing Git & Configuring User Info
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
## 3. Initializing a Repository
|
||||
|
||||

|
||||
|
||||
## 4.Working Directory, Staging, and Commits
|
||||
|
||||

|
||||
|
||||
## 5. Adding & Committing Files
|
||||
|
||||

|
||||

|
||||
|
||||
## 6. Viewing Commit Logs & Diffs
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 7. Creating & Switching Branches
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## 8 Git clone
|
||||
|
||||

|
||||
|
||||
## 9. Adding & Managing Remotes
|
||||
|
||||

|
||||
|
||||
## 10. Pushing & Pulling Changes
|
||||
|
||||

|
||||

|
||||
|
||||
## 11. Ignoring Files with .gitignore
|
||||
|
||||

|
||||
|
||||
Working Directory and staging:
|
||||
|
||||

|
||||
|
||||
Git status Before gitignore
|
||||
|
||||

|
||||
|
||||
Git status after gitignore
|
||||
|
||||

|
BIN
merge conflict.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
merge conflict1.png
Normal file
After Width: | Height: | Size: 13 KiB |