Git is a distributed version-control system for tracking changes in the code base. It is like snapshotting the codebase and you can look up those snapshots at any time including the changes made to a file over time. It does not take much time to learn and get started with git. Most of the work can be done with 4 commands. Services like GitLab, GitHub, BitBucket extend the powers of git for more collaborative environment.
Git-Scm holds the official documentation and downloads.
Once have downloaded and installed git you can open any command line tool or git bash to execute commands. Type
git --version to check the version.
git initto make it a git repository.
Create any file index.html or first-file.txt and type
git add <filename>in our case
git add index.html. You can add multiple files at once by typing
git add .
git statusyou can see the list of changes to be commited. We are at stating area.
To commit our changes - making a snapshot of our files - we need to execute
git commit -m "Start the project with index file."
That's it. We can make any number of snapshots of our files and look them up when needed. But how do you make your project available to other developers to work? Here comes the services.
Gitlab, GitHub, Bitbucket are some of the git repository hosting providers. They can host your local repositories so that anyone who has access to the repo can download it, make and publish changes. Every developer will have their own local copy of the repo.
git remote add origin https://some-git-url.git
We can push our files by typing
git push -u origin master
So you have read the basic flow, there are awesome guides on the internet.
There are good GUI clients to manage the repositories without typing commands. Official site lists all the avilable GUI clients. Some famous clients are