Before going further we need to understand Git. It is a free and open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a fully-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.
It is a version control system allowing us to track changes to our project's code, collaborate more easily, and roll back any inadvertent errors (such as accidentally updating or deleting files).
Now, we will see a few Git commands:
git init
: It will initialize the working directory—you may notice a new directory created, named.git
git add
: It will add all the files under the current directorygit commit
: This commit will create the initial import, given that repositories are coupled with working copiesgit diff
: This will show you any changes that you've made...