added git status before gitignore image

This commit is contained in:
2025-09-02 17:08:42 +05:30
parent 4f19dbc47a
commit 6f6d069366

View File

@ -1,83 +1,83 @@
## Git Assignment ## Git Assignment
## 1.Git Version Check ## 1.Git Version Check
## what is git and version control ## what is git and version control
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: 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. 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. 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 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. connection and provide powerful tools for managing code changes.
## Real-life example where multiple people edit the same file: ## 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. 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? ## 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. 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.
![alt text](<git version.png>) ![alt text](<git version.png>)
## 2. Installing Git & Configuring User Info ## 2. Installing Git & Configuring User Info
![alt text](<git installation.png>) ![alt text](<git installation.png>)
![alt text](<git config.png>) ![alt text](<git config.png>)
## 3. Initializing a Repository ## 3. Initializing a Repository
![alt text](<initializing rep.png>) ![alt text](<initializing rep.png>)
## 4.Working Directory, Staging, and Commits ## 4.Working Directory, Staging, and Commits
![alt text](<add.png>) ![alt text](<add.png>)
## 5. Adding & Committing Files ## 5. Adding & Committing Files
![alt text](add.png) ![alt text](add.png)
![alt text](<add and commit.png>) ![alt text](<add and commit.png>)
## 6. Viewing Commit Logs & Diffs ## 6. Viewing Commit Logs & Diffs
![alt text](<git log.png>) ![alt text](<git log.png>)
![alt text](<git diff commit1 commit 2.png>) ![alt text](<git diff commit1 commit 2.png>)
![alt text](<git diff.png>) ![alt text](<git diff.png>)
![alt text](<git log oneline.png>) ![alt text](<git log oneline.png>)
## 7. Creating & Switching Branches ## 7. Creating & Switching Branches
![alt text](<git branch.png>) ![alt text](<git branch.png>)
![alt text](<create new branch.png>) ![alt text](<create new branch.png>)
![alt text](<git checkout.png>) ![alt text](<git checkout.png>)
![alt text](<git switch.png>) ![alt text](<git switch.png>)
## 8 Git clone ## 8 Git clone
![alt text](<git clone.png>) ![alt text](<git clone.png>)
## 9. Adding & Managing Remotes ## 9. Adding & Managing Remotes
![alt text](<Adding & Managing Remotes.png>) ![alt text](<Adding & Managing Remotes.png>)
## 10. Pushing & Pulling Changes ## 10. Pushing & Pulling Changes
![alt text](<git pull.png>) ![alt text](<git pull.png>)
![alt text](<git push.png>) ![alt text](<git push.png>)
## 11. Ignoring Files with .gitignore ## 11. Ignoring Files with .gitignore
![alt text](<Ignoring Files with .gitignore.png>) ![alt text](<Ignoring Files with .gitignore.png>)
Working Directory and staging: Working Directory and staging:
![alt text](<Working Directory and Staging.png>) ![alt text](<Working Directory and Staging.png>)
Git status Before gitignore Git status Before gitignore
![alt text](<git status before gitignore.png>) ![alt text](<git status before gitignore.png>)
Git status after gitignore Git status after gitignore
![alt text](<git status after gitignore.png>) ![alt text](<git status after gitignore.png>)