0% found this document useful (0 votes)
97 views

Github

Git and GitHub allow for version control of code through a command line interface or GUI. Users can create a GitHub account to store code in remote repositories in the cloud. Code can then be pushed from a local machine to the remote repository using Git commands like init, add, commit, and push. Users can also clone or pull code from remote repositories to their local machine. This facilitates collaboration through features like pull requests.

Uploaded by

rajiv pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Github

Git and GitHub allow for version control of code through a command line interface or GUI. Users can create a GitHub account to store code in remote repositories in the cloud. Code can then be pushed from a local machine to the remote repository using Git commands like init, add, commit, and push. Users can also clone or pull code from remote repositories to their local machine. This facilitates collaboration through features like pull requests.

Uploaded by

rajiv pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Git & Github

Git and github is mainly used to version control system .These version controlling is done by using
command line interface or by using the Graphical user interface also we can do in the github. Our will
be placed to the centralized location of the github from that location we can push or pull the code as
per our requirement.

Step1. First we need to create the git hub account after signing the github account we need sign in the
account and create the new repository inside the github account follow the screen shot below:

Step2: Let us create the free account in the github server

Give the name as Githublearning after selecting repository follow next:


Step 3: In this step we will push the code using the command line interface for that we need to install
git bash by visiting the https://git.scm.com for compatable windows or mac os

Step4: After that create an empty directory across the local machine ex: githublearnig

right click and open the git bash over the githublearning and then use following command to push
the code to the github server

*******************************

git config --global user.name "rajivpandey355"

git config –global user.email "rajivpandey355@gmail.com"

#To identify who is working across this command line interface

git init

git add -A

git status

git commit -m "msg"

git remote add origin reponame

git push origin master

git clone reponame


git pull origin master

This is pictorial representation of how the github will work


Github cloning and pulling request

Step1: Login to github and select the link it will directly take you to the clone and download option
where you can download the code to setup the new server

When you click on to clone or download option where you will find copy the link address, after coping
the link enter the following command:

Step4: To pull the code at the public_html directory


$ git clone https://github.com/rajivpandey355/privaterepos.git

Step5:
$ git pull https://github.com/rajivpandey355/privaterepos.git

After pulling the code you can build the server

You might also like