Files
git-practice-Rahul/GIT_ASSIGNMENT.md
2025-08-21 09:25:37 +05:30

1.2 KiB

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

Git version check


2. Installing Git & Configuring User Info

Git status


Git List

Git status


3. Initializing a Repository

Git Init

Git add


4. Working Directory, Staging, and Commits

Git Add

Git add


5. Adding & Committing Files

Git Log

Git log


6. Viewing Commit Logs & Diffs

Git Log (graph)

![Git log graph](git log_oneline.png)


Git Diff

Git diff


Git Diff (commit1 vs commit2)

Git diff between two commits