Intern
Mis on hoidla?
sobes.tech AI
Vastus AI-lt
A repository is a storage location for the versions of a project's source code, managed using a version control system like Git. It allows tracking changes, collaborating with other developers, and reverting to previous states of the project.
Main components of a repository:
- Working Directory: Files of the project on the developer's local machine.
- Staging Area (Staging Area / Index): An intermediate state where changes are added before committing.
- Commit History: A sequence of recorded changes forming branches.
Types of repositories:
- Local repository: Stored on the developer's local machine.
- Remote repository: Stored on a server (e.g., GitHub, GitLab, Bitbucket) and used for collaboration and backup.
Main operations:
git clone <url>: Create a local copy of the remote repository.git add <file>: Add changes of the file to the staging area.git commit -m "message": Record changes from the staging area into the commit history.git push: Push local commits to the remote repository.git pull: Fetch changes from the remote repository and merge them with the local version.