HOW TO INSTALL GIT ON YOUR LINUX OPERATING SYSTEM?
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.
You can simply install git on your system using thing command on terminal. So that you can directly link your system with your github account.
sudo apt-get install git
It will take few minutes to install.
CREATION OF AN ACCOUNT ON GITHUB
GitHub is a web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.
Go to github website i.e
Creating an account on github is not a huge task. You just need to give a username, email, password and you are done.
Above is the dashboard of git.
NEED TO SETUP GIT USERNAME AND EMAIL ON SYSTEM OS
git config –global user.name “username”
then press enter. This will configure your username. Similarly, type command given below in terminal
git config –global user.email “email”
then press enter.
Between ” ” you need to give your username and email address.
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 and description as per your choice. Then, you can choose public or private repository. Public is free but private is paid. Then click on create repository.
Once repository is created. lets create a directory in the system. let say i am here creating it in home folder by name gittest.
Now, go to the dashboard of git and you will see gittest (name of your directory) on the top. Click on it and you will see series of commands there under create the new repository on the command line.
Enter those commands one by one on your shell.
echo “# gittest” >> README.md
This is for creating a file README.md
gittest is here my directory name.
This is to initialize git in my directory.
git add README.md
This to add file i have created to the git. Add commands add your file to the git.
git commit -m “first commit”
Between ” ” you can enter any thing, this is the commit. You need to commit your file in order to save your changes in git.
git remote add origin https://github.com/dsdeeptisharma/gittest.git
dsdeeptisharma is my username in this case furthur is name of the directory. https://github.com/dsdeeptisharma/gittest.git is the URL which gives link to the git.It links our github and local directory.
git push -u origin master
This is to push your files to github. Furthur you need to enter your github username and password in shell.
This is all about how to begin with github.
Stay tuned … 😉