Version control systems are used to track the changes made to files. By tracking these changes, it’s possible to return to previous versions of a file, as well as tracking users responsible for these modifications. Version control systems make it easy to fix any errors that may occur during development.
A distributed version control system allows collaboration between developers in different locations, and also provides redundancy in the case of a database failure.
GitHub is a hosting service for software development that uses Git for version control.
Once you’ve added a code repository to your local environment, you can track the state of your files using git status.
Once you’ve made changes to the code in a repository, you can use git add to stage the changes to be committed.
Use git commit once you’re ready to create a snapshot of the changes in your files. Add -m “(commit message)” to add a message to your commit.
Use git push to push your commits to a remote directory. If you cloned your repository from GitHub, add origin (branch name) to push to your commits to a specific branch of the remote repository.