Starting with GitHub

GitHub is a platform that leverages the version control capabilities of Git to facilitate collaboration and enable efficient management of software projects.

Here we can see how to install Git and to use various commands of Git.

Installing Git:

Before you use Git commands to control data in GitHub repositories, your system should have Git Installed in it, and to install Git in your system visit Git Download, and follow the procedures.

Depending upon your operating system downloading Git differs from the website properly so you will be able to download Git successfully.

Getting Started with Installing Git, here you can find the procedure for different operating systems.

Here is website  which is for downloading Git on a Windows OS

Git Windows Download

After downloading git into your local device, you check its version and if it is properly installed using the >git version command.

Once git has been successfully installed into your system you can proceed with using Git commands to upload your versions and packages into GitHub repositories.

Before pushing packages into GitHub repositories, you should be able to create a new repository in GitHub by clicking on the new repository option in GitHub and by following the commands below, you can successfully store your projects in remote repositories.

Creating and Uploading an App version and packages into GitHub repositories:

  1. Create App: Here let us create an App using npx create-react-app [app_name], after we use these commands, we will be able to create a react app locally and edit as we want and make a project or an application out of it.
  2. Initializing Git: To upload into GitHub we need to initialize git in the command prompt.To initialize Git we use the command git init.
  3. Checking the status: To check the status of the git we use the git status.

Here is the flow of commands which follow pushing the packages into GitHub repositories:

Files have been uploaded or pushed into GitHub repository

Commands which can be used to operate Git:

  1. git init: This command initializes a new Git repository in the local or current working directory.
  2. git clone [repository]: This command copies and clones the remote repository locally.
  3. git add [file(s)]: This command adds and puts files in the staging area so that they will be prepared for commit.
  4. git commit -m "[message]": This command records all the changes and commits that are made in the directory in descriptive format.
  5. git push: This uploads all the local changes to the remote repository.
  6. git pull: This command fetches and merges all the changes that are made in the remote repository to the local location.
  7. git branch: This command is used to list all the existing branches and it can also be used to create a new branch.
  8. git checkout [branch]: It enables switching between different branches.
  9. git status: This command displays the current status and state of the repository and any remaining changes that are to be made.
  10. git merge [branch]: It integrates one branch with another branch and merges them.

Each command has different variations in use case depending upon the scenario.

Conclusion:

When these commands are mastered well and enough almost all the operations of Git can be easily understood and used. GitHub provides a collaborative environment for developers so learning how to use GitHub is really essential and useful.

References:

  1. https://kinsta.com/knowledgebase/what-is-github/
  2. https://docs.getdbt.com/docs/collaborate/git-version-control
  3. https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
  4. https://github.com/
  5. https://chat.openai.com/
  6. https://create-react-app.dev/
  7. https://www.freecodecamp.org/news/how-to-use-basic-git-and-github-commands/
  8. https://apiumhub.com/tech-blog-barcelona/using-github/
  9. https://www.codeclouds.com/blog/advantages-disadvantages-using-github/

Do Checkout :

To know more about such interesting topics, visit this link.

Do visit our website to know more about our product. 

Article By, Dinesh Sai Kumar Pilla

Reviewed By, Meghana Prabhandham