Git Basics
Key Concepts
- Repository: A hidden directory that stores all project files, directories, and their complete history. It's essential for collaborative development, allowing multiple developers to work simultaneously on a project. Repositories can be local, shared, or remote.
- Commit: A snapshot of changes made to the repository at a specific time, forming a permanent record. Each commit is uniquely identified by a hash and contributes to the repository's commit history.
- Branch: An independent line of development, enabling isolated work on features or bug fixes. It points to a specific commit and aids in organizing changes and maintaining a clean project history.
Git Workflow
Overview of a typical Git workflow:
- Working Directory: Where changes to files occur, monitored by Git to track modifications. Also known as the "working tree" or "working copy".
- Staging Area: A space to prepare and review changes before committing. Also known as the "index" or "cache". It stores information about the next commit.
Note: This video is not 1 hour long. It's only 2 minutes.