DEV Community

Cover image for GitHub For Everyone
Varshith V Hegde
Varshith V Hegde

Posted on

GitHub For Everyone

Table of Contents

What is Github?

Github is a web-based Git repository hosting service. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.
Github is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.It can be used to store and share your code with others. It also makes it easier to track changes and to version control your code. Github is used by companies like Google, Facebook, Netflix, Uber, and many more. It is used by developers to store and share code with each other. It is also used by companies to store and share code with their employees and customers.

What is Git?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. Git was created by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development. Its current maintainer since 2005 is Junio Hamano. As with most other distributed version control systems, and unlike most client–server systems, every Git directory on every computer is a full-fledged repository with complete history and full version tracking abilities, independent of network access or a central server. Like the Linux kernel, Git is free software distributed under the terms of the GNU General Public License version 2.

Why should you use Github?

  • As a developer, you can use Github to store your code and share it with others. You can also use it to collaborate with other developers on your projects.
  • As a company, you can use Github to store your code and share it with your employees and customers. You can also use it to collaborate with other companies on your projects.
  • As a Job Seeker, you can use Github to showcase your projects and skills to potential employers.
  • You can flex your coding skills by contributing to open source projects on Github.
  • You can use Github to host your website for free.

Features of Github

  • Version Control - Github is a version control system. It allows you to revert files back to a previous state, revert the entire project back to a previous state, review changes made over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more. Using Github, you can collaborate with other developers on the same project. You can also use Github to create your own portfolio website.
  • Issue Tracking - Github has an issue tracker built in. It allows you to create issues and assign them to people. You can also create milestones and label issues. You can also close issues when they are resolved.
  • Pull Requests - Pull requests let you tell others about changes you've pushed to a repository on Github. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
  • Wikis - Github has a built-in wiki system. You can use it to create documentation for your project. It is also a great place to share information about your project with your team.
  • Social Coding - Github is a social coding platform. You can follow other developers and see what they are working on. You can also see what other developers are working on by looking at their public repositories. You can also star repositories that you find interesting. You can also create your own public repositories and share them with the world.
  • Code Review - Github has a built-in code review system. You can use it to review code that other developers have committed to a repository. You can also use it to review your own code before committing it to a repository.
  • Project Management - Github has a built-in project management system. You can use it to create projects and add issues and pull requests to them. You can also create milestones and assign them to issues and pull requests. You can also create labels and assign them to issues and pull requests.
  • Team Management - Github has a built-in team management system. You can use it to create teams and add repositories to them. You can also add users to teams. You can also give users different levels of access to repositories. For example, you can give users read-only access to a repository. You can also give users read and write access to a repository. You can also give users admin access to a repository.

Where and When to use Github?

  • When you want to share your code with others - Github is a great place to share your code with others. You can create a public repository and share it with the world. You can also create a private repository and share it with your team.
  • When you want to collaborate with others - Github is a great place to collaborate with others. You can create a public repository and invite others to contribute to it. You can also create a private repository and invite others to contribute to it.
  • When you want to create your own portfolio website - Github is a great place to create your own portfolio website. You can create a public repository and use it to host your portfolio website. You can also create a private repository and use it to host your portfolio website.
  • When you want to create a website for your open source project - Github is a great place to create a website for your open source project. You can create a public repository and use it to host your website. You can also create a private repository and use it to host your website.

Getting Started with Github

  • Create a Github account - To get started with Github, you need to create a Github account. You can create a Github account by going to Github.com
  • Create a repository - Once you have created a Github account, you need to create a repository. You can create a repository by going to Github.com and clicking on the plus icon in the top right corner. You can also create a repository by going to Github.com and clicking on the plus icon in the top right corner and then clicking on New repository.
  • Create a file - Once you have created a repository, you need to create a file. You can create a file by clicking on the Create new file button. You can also create a file by clicking on the Create new file button and then typing the name of the file.
  • Commit a file - Once you have created a file, you need to commit it. You can commit a file by clicking on the Commit new file button. You can also commit a file by clicking on the Commit new file button and then typing a commit message.
  • Create a branch - Once you have committed a file, you need to create a branch. You can create a branch by clicking on the Branch: master dropdown and then typing the name of the branch.
  • Make and commit changes - Once you have created a branch, you need to make and commit changes. You can make and commit changes by clicking on the pencil icon in the top right corner. You can also make and commit changes by clicking on the pencil icon in the top right corner and then typing the changes you want to make.

How to push code to github from Command Line

  • Create a new repository on Github. To create a new repository on Github, go to Github.com and click on the plus icon in the top right corner and then click on New repository.
  • Open Git Bash. To open Git Bash, click on the Windows icon in the bottom left corner of your screen and then type Git Bash and press enter.
  • Change the current working directory to your local project. To change the current working directory to your local project, type cd and then drag and drop your local project folder into the Git Bash window and press enter.
  • Initialize the local directory as a Git repository. To initialize the local directory as a Git repository, type git init and press enter.
git init
Enter fullscreen mode Exit fullscreen mode
  • Add the files in your new local repository. This stages them for the first commit. To add the files in your new local repository, type git add and then drag and drop your local project folder into the Git Bash window and press enter.
git add .
Enter fullscreen mode Exit fullscreen mode
  • Commit the files that you've staged in your local repository. To commit the files that you've staged in your local repository, type git commit -m and then type a commit message and press enter.
git commit -m "First commit"
Enter fullscreen mode Exit fullscreen mode
  • In the Command prompt, add the URL for the remote repository where your local repository will be pushed. To add the URL for the remote repository where your local repository will be pushed, type git remote add origin and then paste the URL you copied in Step 2 and press enter.
git remote add origin "remote repository URL"
Enter fullscreen mode Exit fullscreen mode
  • Push the changes in your local repository to Github. To push the changes in your local repository to Github, type git push origin and then type the name of your branch and press enter.
git push origin master
Enter fullscreen mode Exit fullscreen mode
  • Go to your Github repository. To go to your Github repository, go to Github.com and click on your profile picture in the top right corner and then click on your repository.
  • Hooray🎉! You pushed your code to Github!

How to Create Github Readme Profile ?

  • Create a new repository on Github. To create a new repository on Github, go to Github.com and click on the plus icon in the top right corner and then click on New repository.
  • Give the repository name as your username. For example if your username is Varshithvhegde then create a repository with the name Varshithvhegde.
  • Then you can see a new option called Add a README file. Click on that option.
  • Then you can customize your Github profile by adding your name, skills, social media links, etc.
  • You can refer or use templates like this to create your Github profile.
  • You can also use Readme Generator to create your Github profile. You can refer this to create your Github profile.
  • Hooray🎉! You created your Github profile!

Uses of Github

  • Easy to use
  • Free
  • Open source
  • Great for collaboration
  • Great for version control
  • Great for code review
  • Provides a great way to share code with others

Conclusion

Github can be a great to learn, collaborate , also meet new developers wit innovative ideas. So as a developer you should definitely learn Github. I hope this article helped you to learn Github. If you have any doubts or suggestions, please comment below. Thank you for reading this article. Happy Coding!👨‍💻

References

Top comments (0)