GIT: It is a distributed version control system (system to record changes to files over time) having many features like it helps to add access control,display content of git repository (place where multiple files are located) and help managing multiple repositories.
Create an account:
- You can use the
aptpackage management tools to update your local package index. Afterwards, you can install GIT:
$ sudo apt-get update $ sudo apt-get install git
- Now that you have
gitinstalled, you need to do a few things so that the commit messages that will be generated for you will contain your correct information.The easiest way of doing this is through the
git configcommand. Specifically, we need to provide our name and email address because
gitembeds this information into each commit we do. We can go ahead and add this information by typing:
$ git config --global user.name "Your Name" $ git config --global user.email "firstname.lastname@example.org"
- We can see all of the configuration items that have been set by typing:
$ git config --list
Creating First Repository.
- Go to the dashboard of git and click on the + sign which is there in right side at the top. Click on new repository.
- Give your repository name (Let it be firstrepo) and description as per your choice. Then, you can choose public or private repository.
Create a directory for that Repository.
- Now create a directory to link it with repository:
$ mkdir firstrepo
- Open directory:
$ cd firstrepo
- Create or Copy the files in this directory which you want to upload on git repository name as firstrepo.
- Now initialize the git in this directory using:
$ git init
- Now add the newly created or copied file to git using:
$ git add filename
- You need to commit your file in order to save your changes in git. You can commit your file using:
$ git commit -m “first commit”
- Now creates a new remote called
$ git remote add origin https://github.com/username/repositoryname.git
- Now you can push to
originfor that you have to enter github Username and Password.
$ git push origin master
Stay Tuned Thanks 🙂