git,github,how to host using github

22
Git, GitHub,How to host your website using github

Upload: sujata-regoti

Post on 13-Apr-2017

261 views

Category:

Technology


8 download

TRANSCRIPT

Page 1: Git,Github,How to host using Github

Git, GitHub,How to host your website using github

Page 2: Git,Github,How to host using Github

2

• Lesson 1: Version Control

• Lesson 2: Git

• Lesson 3: GitHub

• Lesson 4: How to host your website using github

Club Service Outline

Monday, January 9, 2016

Page 3: Git,Github,How to host using Github

3

•What is version control?

•Why we need version control

•Types of version control

•Popular version control systems

Version Control: Objectives

Monday, January 9, 2016

Page 4: Git,Github,How to host using Github

4

“An application that allows you to record changes to your codebase in a structured and controlled fashion.”

What is version control?

Monday, January 9, 2016

Page 5: Git,Github,How to host using Github

5

Makes it way easier to undo errors / roll back to earlier versions of code

Why we need Version Control?

Monday, January 9, 2016

Page 6: Git,Github,How to host using Github

6

• Every Client can have a copy of repository to work offline

• Eg. Git

Distributed Version Control (3rd Generation)

• One Repository is shared within all Client• Eg. Telnet

Traditional Version Control (2nd Generation)

Types of version control systems

Monday, January 9, 2016

Page 7: Git,Github,How to host using Github

7

•SVN – SubVersioN•CVS - Concurrent Version System •Git •Mercurial •Bazaar • LibreSource

Popular version control systems:

Monday, January 9, 2016

Page 8: Git,Github,How to host using Github

8

•What the heck is Git?

•Git Sample Example

•Git Installation

•Git Commands and Practices

Git: Objectives

Monday, January 9, 2016

Page 9: Git,Github,How to host using Github

9

•Git is a version control system.• It is a best Distributed VCS example.•Originally developed by Linus Torvalds for the

development of the Linux Kernel in 2005 •Key Points:▫Open source, free▫Focus on Speed and efficiency▫Branching, automatic merging

What is Git?

Monday, January 9, 2016

Page 10: Git,Github,How to host using Github

10

•For WINDOWS:http://git-scm.com/

•For LINUX:~(sudo) apt-get install git

Git Installation

Monday, January 9, 2016

Page 11: Git,Github,How to host using Github

11

• Repository : A storage place where all versions of a project are stored.(local repository refers to a repository on your computer and remote repository refers to a repository on a server like github.com)

• Cloning : To get a copy of a remote repository to your local computer.

• Fetching : To get latest changes from remote repository without merging

• Pushing : To commit the changes to the remote repository

Git Glossary

Monday, January 9, 2016

Page 12: Git,Github,How to host using Github

12

• Pulling : To get latest changes from remote repository and merge them with your local repository.

• Commit : To save changes in the local repository

• Checking out : means to get a snapshot of a file or a set of files in a specific version to your working directory.

•Untracked basically means that Git sees a file you didn’t have in the previous snapshot (commit);

Git Glossary

Monday, January 9, 2016

Page 13: Git,Github,How to host using Github

13

•Working directory: is a single checkout of one version of the project. These files are pulled out of the compressed database in the .git directory and placed on disk for you to use or modify.

•HEAD: refers to a pointer pointing to the currently checked out commit.

Git Glossary

Monday, January 9, 2016

Page 14: Git,Github,How to host using Github

14

• git init• git help <command>• git status• git add • git commit –m “message”• git log• git diff • git branch <branch-name>• git checkout <branch-name>• git merge <branch-name>

Git Commands

Monday, January 9, 2016

Page 15: Git,Github,How to host using Github

15

•What is GitHub?

•Why GitHub?

• Important Links ..

GitHub : Objectives

Monday, January 9, 2016

Page 16: Git,Github,How to host using Github

16

• In simple words GitHub is a code sharing and collaborating platform.

• It’s a Git repository hosting service… but it adds many of its own features.

•While Git is a command line tool, GitHub provides a web-based graphical interface

What is GitHub?

Monday, January 9, 2016

Page 17: Git,Github,How to host using Github

17

•By default, all projects are public and free. In you want a private project, then you have to pay.

•You can clone any public repository, follow projects and developers, post comments.

Why GitHub

Monday, January 9, 2016

Page 18: Git,Github,How to host using Github

18

•Official Git sitehttp://git-scm.com

•Git commandshttp://gitref.org/basic

•GitHub site http://github.comhttps://github.com/CourseReps/ECEN489-Fall2015/wiki/Git

Important Links:

Monday, January 9, 2016

Page 19: Git,Github,How to host using Github

19

Monday, January 9, 2016

1. Create new repository by clicking on new repository button2. Give repository name as “your_username.github.io”. For e.g. In my case as shown

3. Click on create repository.

How to host your website using github

Page 20: Git,Github,How to host using Github

20

Monday, January 9, 2016

4. Now go to directory where you want to place your website files. For e.g. say D:\GITHUB\MYWEBSITE and right click and select open “Git Bash Here”

5. Give command : git clone https://github.com/<username>/<username>.github.io

5. This will create folder of <username>.github.io. Add all files(.html,css,js) for your website into this folder

How to host your website using github(continued)

Page 21: Git,Github,How to host using Github

21

Monday, January 9, 2016

How to host your website using github(continued)6. After adding files give command:> git add .> git commit –m “first commit”> git push origin master

7. That’s it..!! Now go to url “https://<username>.github.io”

Page 22: Git,Github,How to host using Github

22

Monday, January 9, 2016

Thank You!