102 lines
1.6 KiB
Markdown
102 lines
1.6 KiB
Markdown
<!-- @format -->
|
|
|
|
# Git Assignment
|
|
|
|
## 1. What is Git and Version Control
|
|
|
|
What problem does Git solve?
|
|
Git solves the problem of tracking changes in code and coordinating work across multiple developers.
|
|
|
|
Real-life example where multiple people edit the same file:
|
|
Real-life example: Several people editing a shared report in Word at the same time leads to conflicts and lost edits.
|
|
|
|
Why is version control better than emailing files back and forth?
|
|
Version control is better than emailing files because it keeps a single source of truth with automatic history and collaboration tools.
|
|
|
|
|
|
## Git Version Check
|
|
|
|

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

|
|
|
|
---
|
|
|
|
## Git List
|
|
|
|

|
|
|
|
---
|
|
|
|
## 3. Initializing a Repository
|
|
|
|
## Git Init
|
|
|
|

|
|
|
|
---
|
|
|
|
## 4. Working Directory, Staging, and Commits
|
|
|
|
## Git Add
|
|
|
|

|
|
|
|
---
|
|
|
|
## 5. Adding & Committing Files
|
|
|
|
## Git Log
|
|

|
|
|
|
---
|
|
|
|
## 6. Viewing Commit Logs & Diffs
|
|
|
|
## Git Log (graph)
|
|
|
|

|
|
|
|
---
|
|
|
|
## Git Diff
|
|
|
|

|
|
|
|
---
|
|
|
|
## Git Diff (commit1 vs commit2)
|
|
|
|

|
|
|
|
---
|
|
|
|
## Creating & Switching Branches
|
|
|
|

|
|
|
|
---
|
|
|
|
## Cloning a Remote Repository
|
|
|
|

|
|
|
|
---
|
|
|
|
## Pushing & Pulling Changes
|
|
|
|

|
|
|
|
---
|
|
|
|
## Ignoring Files with .gitignore
|
|
|
|

|
|
|
|
---
|
|
cd D:\git-practice-Rahul
|