Tue, 13 Apr, 2021

Learn About GitHub: A Hub for Social Coders

By Ankit Pradhan

GitHub is a platform, or place, where we can share our code with others. It is a social coding site, just like social networking sites such as Facebook or Twitter. GitHub allows individuals to post their code, share code and upload personal profiles. It is also the world’s largest code host and has a central repository where all the code and files are stored. Git is a command line while GitHub provides a web based GUI. There are many features available in GitHub like access, control and many collaboration features like wikis and basic management tools to manage projects. GitHub is a hub of Git repositories for collaborative working. Git was developed by Linus Torvalds, the developer of the Linux. Git is a version control system. Version Control Systems (VCS) are those which keep track of the changes made to projects. However, Git is different from other VCSs because it keeps an account of the information of a project using a set of snapshots and references to the snapshots. That is, if any change is made to the existing software, a snapshot of how the software looks at that time is captured and a reference to that snapshot is kept. If no changes are made, a reference to the previous snapshot is kept. GitHub has made it easier to use Git in many ways. GitHub has provided a visual interface to all users to manage their projects remotely and locally. By creating an account in GitHub, one can have their local projects available in the web and in social networks. github GitHub can be used through the GitHub GUI (Graphical User Interference) or Git CLI (Command Line Interface). Many people,especially developers, prefer command line interface because they find command line interfaces to be more powerful and comfortable. In case of branching and merging, Git CLI offers a greater amount of control.The GUI makes the users’ work easier through a friendly interface.However, CLI helps the users figure out what actually goes on behind the use of such user-friendly interfaces. GitHub has a steep learning curve because users have to learn a new vocabulary to use it. Repository, commit and branch are some of the terminologies necessary for beginners to learn. We will describe them below. Repository aka“repo” is a place or storage space where your project files are kept. The repo is the location where your project files can be shared with everyone.Users can make changes to your project, make it better and the project can grow. The repository is the main building block for GitHub. Users make copies of the public repository on their local computer to make changes and they send those changes to GitHub for acceptance by the person or team managing the repo. A repository can house any file type including images, text, and code. Commit: Committing is just like taking a snapshot of your repository and keeping the record of that snapshot. As we proceed in our project we use commits so we can compare and re-evaluate or restore our projects to any previous state that we have committed.We can also check the progress that we have made at any time. Branch: In Git, multiple people from different places all over the world may work on the same projects at the same time.Branching allows them to do so without confusion. They “branch off” the main project and continue to do work without making change in the main project. Once a developer is ready to ship their code to the master branch, they initiate a pull request to merge the new code to the main project.   There are a few more terms that are essential to understanding the use of Git and GitHub fork, pull and merge. Fork: Fork means to copy another user’s repository from their account to our account. Forks retain the original connection so we can get updates from the original repo. When we need to update a project, then we fork that project and continue to do our work. Forking allows us to make any changes or do any experiment we want without interfering with the original repository. Forking is either used to take an idea from the forked project to start a new one by beginners or to make changes in those projects. You can not work on the original code source unless you have access from the owner. Instead of requesting access, you can fork the repo and test your changes on your local version of it. Pull: When we fork another person’s project and repository to make changes,we use a pull request to tell the original user about the changes that we intend to push in that repository.  Once the pull request is sent, the owner of the original repo can accept our changes and contact us for mistakes or other changes related to the pull request. Merge: Merge is another important feature that makes GitHub special. Once we have completed our work in a branch, we can merge the code we wrote with the master project so that it becomes part of the main project. Free GitHub accounts are available to the public. They also have a paid service that allows individuals and organizations to host private repositories. For example, Deerwalk could host their source code in GitHub in a private repository. GitHub recognizes that many companies host proprietary software on their system and they are dedicated to security. GitHub is secure in terms of both physical and software security. Data centres are accessible to a limited number of staff and data technicians. There are security cameras monitoring all data centres. For control, data centre access requires biometric scanning. There are server specialists at GitHub 24/7 eliminatingpotential security vulnerabilities. All the data exchanged in GitHub is transmitted through SSL and all the pushing and pulling of private data is done through SSH. GitHub can be useful in DWIT since everyone have to do different groups projects and they have their own works divided. But it may not be possible for everyone to meet always and discuss their project in that case everyone can have their GitHub account and commit their work in GitHub and share with other team members so that it will be easy for everyone to view each other’s progress. GitHub helps to organize, annotate, and share knowledge. Those who want to use this forum, at first they have to go to GitHub.com and create their own account. Then, they have to install GitHub for PCs. They can download GitHub for their mac, windows and Linux as well. After installing GitHub,they have to set up GitHub then create repository. After creating repository,they can make their first commit. They can use either command line interface or GitHub GUI as per their convenience. It would be better to have little knowledge about HTML, CSS and Markdown.