0% found this document useful (0 votes)
26 views18 pages

Git 111

Git is a version control system used to track changes in files or folders for collaboration. It has two types of version control systems: centralized and distributed. Distributed version control allows working offline and provides backups. GitHub is a website to host Git repositories online and make collaboration easier.

Uploaded by

anil rathod
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)
26 views18 pages

Git 111

Git is a version control system used to track changes in files or folders for collaboration. It has two types of version control systems: centralized and distributed. Distributed version control allows working offline and provides backups. GitHub is a website to host Git repositories online and make collaboration easier.

Uploaded by

anil rathod
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/ 18

Git

 Git is version control system


 Used to trackchanges in files or folders
 To collaborate in teams
 Its open source
There are two types of version control system
1. Centralize version control system
2.Distributed version control system
Distributed version control system
Advantages

 If anything goes wrong in server we can back up the repository


from any local system because these are the copy of repository
 U can work in offline mode by taking local copy if we want to
push the code then only need internet connection

Git hub
 Its website to upload your repository online
 Provide backup provides visual interface to your repo
 Make collaboration easier
 Gitand github not related to each other with git we can use
github orbitbucket
Go to browser type git

Git hub
Its website to upload your repository online
Provide backup provides visual interface to your repo
Make collaboration easier
Git and github not related to each other withgit we can use
githubotbitbucket
Steps
Check git already installed or not,open command prompt entre git --
version
Download and install git>>open google entre git
How to check git installed or not

Once installed
1. Go to the folder and right click on that folder >>select git
bash here >>the use >>gitinit command

Then check git status by using command >>>>git status


Create file in local repository by usingcommand dir>shri.txt
Then check status by using command >>git status

The add file to git by using command >>git add shri.txt and check
status by using command git status
The do commit by using command >>git commit –m”add message in
this double inverted comma ”
Push the code in remote repository (github ) by using command
git remote add origin https://github.com/shrinivasmac/IBM-Project-
Repo.git
git remote add origin>>>command
https://github.com/shrinivasmac/IBM-Project-Repo.git >>git hub
repository location

then use push command >>git push –u origin master


Then it will ask credentials then run two commands
1.gitconfig --global user.email "[email protected]"
2.gitconfig --global user.name "shrinivasmac"

Then some other command are the


1. git log>>it will shows all the information whatever you have done
How to clone the code from remote repository
Clone means if in your local repository file is not present if you want to
take that file from remote repository then use clone command

How to pull code from remote repository


Pull means if you change something in remote repository if we want
those change which is made in remote repository the use pull
command
To push code into git hub repository use below commands
gitinit :This command used to start git
git status :This command used to check status
git>shri.txt : This command used to create file
git status
git add shri.txt : This command used to add the file in local repository
git status
git commit -m "shri file is commited" : commit command makes your
files as part os local repository
git remote add originhttps://github.com/shrinivasmac/IBM-
Project.git :This command used to add path of remote repository
git push -u origin master : This command used to pus code into remote
repository

pull commands
git pull origin master : This command used to pull the code from
remote repository to local repository

clone command
git clone https://github.com/shrinivasmac/IBM-Project.git :This
command used to copy the code from remote repository to local
repository

You might also like