What is GitHub and How to Access it Through Linux?

Source: Influxdata

GitHub is a power hub where over more than 65 million developers, programmers, organizations, and many learners are shaping the upcoming future together. It is a community of open-source contributors, that develop software solutions for the world. It can be asserted as the biggest and most encouraging development platform in the world. Numerous companies use GitHub for building, deploying, and managing their software. It manages and maintains more than 200 million repositories. 

Why use GitHub?

1. It helps to record or back up any change to the code and maintains the code to sync with us and our team.

2. Allows us free hosting with unlimited public and private repositories.

3. We are also accessible to the world’s best community projects. That helps us to accelerate our work without commencing it from the beginning.

4. Can also ask queries and questions, allows for open-ended conversations regarding any project.

5. Provides functionality to create teams and work on the cloud.

How can one use GitHub?

GitHub provides basic free services that are free of charge. Its advanced enterprise services are commercial in use. But it offers free GitHub accounts which can be commonly used by anyone to host its projects. Thus, it makes it the largest source code provided in the world.

To use its feature of web hosting and version control the user needs to have “Git”. It is famous for providing the distributed version control and source code management functionality of Git, plus its features and specifications.

Its several collaboration features are bug trackingtask managementcontinuous integration, feature requests, and wikis that can be used in any project of the user.

What is Git?

If you are new to Git. Then you should know about the fact that Git and GitHub are not the same. Till now, we have discussed that for starting with GitHub we should have Git. So, Now, we are going to discuss “Git”.

Git is a version control tool that is mostly used in open-source. It was created in 2005 by developers working on Linux. GitHub (founded in 2008) makes tools that are integrated with the help of Git. One point to keep in mind is that “We can use git without GitHub. On the other hand in the case of GitHub it needs Git for its working”. The other platforms that can be used other than GitHub are BitBucket, GitLab, and “host-your-own” solutions such as dogs and glitter they also make sharing of our code easier.

How to install Git on Linux?

Usually for Linux operating Systems like Debian or Ubuntu(apt-get). As Git packages are available via apt.

Step 1: Firstly, from your shell, install Git using apt-get like:

             $ Sudo apt-get update

             $ Sudo apt-get install git

Step 2: Then, verify your installation by typing git –version:

              $ git --version

              git version 2.9.2

Step 3: Now, configure your Git username and email, replacing the user name with your name. These details will be linked with any commits that you create from your Linux device.

             $ git config --global user.name "Your_Name"

             $ git config --global user.email "your_email_id@email.com"

For knowing more information about the installation of apt packages can visit Atlassian, for getting the knowledge of commands used.


After successful installing Git on your Linux System. Now, you can use GitHub by:

How to get a Git repository on Linux?

Step 1: The first step involves creating a new repository on GitHub that can be seen below:

Git_2

Step 2: Then, launch Git Bash on your system, then launch a terminal or can create a directory using the command:

             mkdir ~/new_Project

             cd ~/new_Project

             check contents of your project using ls

If your repository does not exist locally, you can get the clone link from the "Clone or Download" button. Can clone using git clone [your-copied-url].


Clone or Download Button on GitHub


Step 3: Now, check the branch using the command:


             git branch

             git checkout master


Step 4: Don’t forget to check your branch is up to date or not using the command:


             git pull


Now, your code is ready and if your working branch is shown as your active branch, it means you are ready to work! 


Step 5: This step is the most important as at this step the changes you made will be committed to your repository at GitHub.

1. Open your code in your editor such as VS Code, Netbeans, etc., and begin working.

2. Save your code before switching to the terminal and then stage it using the command:

git add.

3. Now, you have to commit your changes using:

git commit -m “[your_commit_message]”

4. Now, once you commit your code, you have to push your changes to the remote repository at GitHub by using the command:

git push

5. Now, repeat the same process as you proceed in your code.

References

https://github.com

https://atlassian.com

https://en.wikipedia.org 


Written By - Daksh Malhotra

 

 


Post a Comment

0 Comments