Syllabus Point
- Investigate the reasons for version control and apply it when developing web application
Version control systems enable teams to collaborate effectively, track changes, manage multiple versions simultaneously, and automate testing and deployment. Git and platforms like GitHub have become industry standard for web development.
Importance and reasons for version control systems
- Collaboration between multiple developers
- Maintains audit trail of changes, including who, when, why
- Provides a backup in case of accidental deletions or corruption and enables rollback to previous versions
- Supports CI/CD pipelines, automating software testing and deployment
- Parallel development like feature branching, where features can be developed independently
Types of version control
- Local version Control: simple storage of different versions on a single computer
- Centralised Version Control (CVSC): a single server stores all versions of files (e.g. SVN)
- Distributed Version Control (DVCS): each user has a complete history of changes (Git)
Git and platforms
Git is the most popular distributed version control system. GitHub, GitLab, and BitBucket are platforms that host repositories and support collaborative development.
Key Git terms
- Repository: Storage space for files tracked by Git
- Commit: A snapshot of changes in the repository
- Branching: Creating different versions of the project for parallel development
- Merging: Combining branches together
- Pull Request: Used in collaborative development for reviewing and merging changes
- Cloning: Copying a repository to work locally
Basic Git workflow
Example workflow:
<pre><code>git init # Initialize a repository git add . # Add files to staging area git commit -m "Initial commit" # Save changes git push origin main # Push changes to remote repository</code></pre>
Related Resources
Keep Progressing
Use the lesson navigation below to move through the module sequence.