Git is a free, open-source version control system (VCS) that’s widely used in web development:
- DistributedEach developer has a local copy of the code repository’s full history. This allows developers to work offline or remotely.
- Records changesDevelopers can record every change to the source code, making it easy to revert to older versions.
- PerformanceGit is designed for performance when committing changes, branching, merging, and comparing past versions.
- Works with GitHubGitHub is a website and infrastructure that provides a Git server and tools for working with Git repositories. These tools include:
- Reporting issues with the code
- Reviewing tools
- Project management features
- Reporting issues with the code
To push live changes to a website using Git, you can:
- Add a post-receive hook
- Log into the web server via SSH
- Make sure you’re in the remote repository directory
- Run nano and create a file named post-receive
- Add code to the file
- Save and close the file
- Give the file execute rights