Basics of Github. Basic Commands & how to use it?


Basics of Github. Basic Commands & how to use it?

GitHub is a web-based platform that is built on top of Git, a version control system. It provides additional features and tools that make it easier for developers to collaborate on projects and share code. Here are some basic concepts and steps for using GitHub:


  • Repository: A repository is a collection of files and the history of changes made to those files. A GitHub repository is similar to a Git repository, but it is hosted on the GitHub platform and can be accessed and collaborated on by multiple users.
  • Commit: A commit is a snapshot of the changes made to the files in a repository. When you commit changes on GitHub, you are creating a new version of the project's codebase with a message that describes the changes you made.
  • Branch: A branch is a separate version of a repository that allows you to make changes to the codebase without affecting the main codebase. This allows multiple developers to work on different features or bug fixes simultaneously without interfering with each other.
  • Pull request: A pull request is a request to merge changes from one branch into another. When you create a pull request on GitHub, you can request that your changes be reviewed and approved by other members of the team before they are merged into the main codebase.

To use GitHub, you will need to create an account and set up a repository for your project. Here are the basic steps for using GitHub:


  1. Sign up for a GitHub account and log in.
  2. Create a new repository by clicking the "New" button and following the prompts.
  3. Clone the repository to your local computer by running the "git clone" command and specifying the repository's URL.
  4. Make changes to the codebase on your local computer.
  5. Commit the changes you have made by running the "git commit" command and including a message that describes the changes.
  6. Push the changes to the remote repository on GitHub by running the "git push" command.
  7. Create a new branch on GitHub by clicking the "Branch" button and specifying the name of the branch.
  8. Switch to the new branch by running the "git checkout" command and specifying the name of the branch.
  9. Make additional changes to the codebase on the new branch.
  10. Commit the changes you have made to the new branch.
  11. When you are ready to merge the changes back into the main codebase, create a pull request on GitHub by clicking the "New pull request" button and following the prompts.
  12. Have your pull request reviewed and approved by other members of the team.
  13. Merge the changes into the main codebase by clicking the "Merge pull request" button.

These are the basic steps for using GitHub, but there are many other features and tools available on the platform that allow you to manage and collaborate on projects more effectively.


Did you find this article useful?