Git and GitHub Tutorials - Basics

Git and GitHub Tutorials - Basics

Lecture 2

Step 1: Create your account on GitHub

Step 2: Download "git-scm" , Link: https://git-scm.com/download/win So that you can run Unix commands on your windows machine

Create your own repository :

click on the " New " button to create a new repository. You can set its description or change its access to "public" or "private" depending upon your requirement.

How to Clone a GitHub Repository:

command:

git clone "https://github.com/mukundtheamateur/FutureFinders.git"

you just have to copy the git link from :

How to Initialise an empty Git repository :

git init

How to create a commit and push the files in the repository:

step1: Create a clone of the repository 
       git clone "https://github.com/mukundtheamateur/FutureFinders.git"
step2: Make changes in the repo 
step3: Add files in .git 
       git add . 
step4: how to commit ? 
       git commit -m "comment anything" 

       Note* 
       you first have to setup your username and email using git config             command :
       git config --global user.email "your email here without double quotes"
       git config --global user.name "your github username without double quotes"
step5: push the commit to the repo 
       git push

How to create a pull request in a certain repo?

step1: Fork the repository.

step2: when you fork a repository, a clone of that repo will be created in your profile 
step3: Clone that forked repository in your system using command given below:
       git clone "git - link" 
step4: Make some changes in the forked repository 
step5: CREATE A COMMIT using following command:
       git add .
       git commit -m "new comment"
       git push 
       this will push the updates in your forked repository

After these steps, you will notice that your branch is 1 commit ahead of the actual repository branch. So to create a pull request, just click on the "contribute"
This will ask to open a pull request. So just a create a PULL REQUEST.