GitHub Basic Operations Pt. 2

GitHub Basic Operations Pt. 2

Prerequisite - Install Git-scm in your local system. (Refer 1st blog)

Pushing files in GitHub Repository

  1. Suppose we want to push this file "My Task" from our local system to our new GitHub repository.

  2. Open cmd terminal or Git Bash in this folder only & type the first command "git init".

  3. A new empty repository has been initialized. Now type "git add ." to add all the files in the git staging area & check the status using "git status".

  4. Since no files are committed yet. Let's commit the files using "git commit -m <any_message>" & change the branch name from "master" to "main" using "git branch -m main" & again check the branch using "git branch -a".

  5. Now we have to connect our local system repository to our GitHub repository and push the files using "git remote add origin <"repo_url">" & "git push -u origin main".

  6. Check the GitHub repository and make sure that the file is added.

Forking a repository

Forking a repository means making a copy of someone's repository into your own GitHub account for making some Pull request or Merge requests.

Cloning a repository

Cloning means copying the repository files from a remote server to our local machine. We can clone the repository using the command line as well from GUI.

About README.md

A README file is an essential guide that gives other developers a detailed description of your GitHub project.

A good README helps your project to stand out from other projects and should be as good as your project itself.

Setting your README.md

  1. To set up your README.md file and make it look attractive, you first need to create a repository of your username & make it public.

  2. It will be a special repository where you can customize your README file.

  3. There are some special tools to make your README files such as:

  4. After generating the README file from the above tools, copy the markdown code and paste it into README.md file in edit mode, and then save it.

  5. An attractive profile will be displayed among other users.

    You can check my GitHub profile using - Yatingambhir85 (Yatin Gambhir) (github.com)