Slide 1

Slide 1 text

GIT HUB Fast & Simple © chenchih 201606

Slide 2

Slide 2 text

Objective • What is Github • Understand how to used Github • Understand some simple command – Add/ delete file – Add/ delete folder – Git Fuunction: Push, commit, fork • Introduce types of utility – Window – Linux(Ubuntu) we will be using this – Mac

Slide 3

Slide 3 text

Will/ Will Not • Will – Keep it easy and fast – Teach you the basic of GITHUB. – Faster and let you clear on it. – Any one can learn, simple and fast. • Won’t – Teach you too advance /complicated command . – Teach every function on GITHUB

Slide 4

Slide 4 text

Flow chat Register an account http://github.com Create a Project Repository GitHub Utility Window/Linux/MAC Install Package Linux(Ubuntu, Debian) #sudo apt-get install gitcore Mac #brew install git Window https://desktop.github.com GIT download all platform https://git- scm.com/download/ Add/Delete file Create /Delete Folder You should know how to use

Slide 5

Slide 5 text

Register an account • Register an account – Go to https://github.com • After Register, go to your site – https://github/your-user-name – https://github.com/chenchih

Slide 6

Slide 6 text

What is GITHUB • Version Control – Help you organize each version of code • Will not lost code • Will record every record of your code

Slide 7

Slide 7 text

Other Type Version Control – CVS – SVN – Git – Bazaar – LibreSource – Reference: https://www.smashingmagazine.com/2008/09/th e-top-7-open-source-version-control-systems/

Slide 8

Slide 8 text

Create a new repository /project • Login to your account on hithub • Add a new repository

Slide 9

Slide 9 text

Create a new project • Name any name of your project

Slide 10

Slide 10 text

Now use GIT HUB Utility • Linux – Ubuntu/Debian: #sudo apt-get install gitcore • MAC – #brew install git • Window – Window git hub • https://git-for-windows.github.io/ • https://desktop.github.com/ (github desktop) – Source tree • https://www.sourcetreeapp.com/

Slide 11

Slide 11 text

Linux GIT create file form local • Download from git server by – #mkdir /GITHUB – #cd /GITHUB – #git clone https://github.com/username/project – #git clone https://github.com/chenchih/test2016

Slide 12

Slide 12 text

Basic GIT 1) Local file to GIT Server • Download repository into local disk – Create a directory(recommend) – ~/#mkdir /GITHUB – # cd /GITHUB – git clone http//github.com/xxxxx/ooooo Xxxusername 000000prokject name – Example: • git clone https://github.com/chenchih/test2016 • Create file on local disk – # cd /GITHUB/test2016 – #touch example2016.txt

Slide 13

Slide 13 text

• Upload File into git server – (create file from local) • # cd /GITHUB/test2016 • #touch example2016.txt – Must be the same as local – (add file to git server) • git add 'files • #git add ‘example.txt’ – Committed and upload (write description of your file) – #git commit -am “description of file“ (Upload to server) – #Git push 2)Upload file from local to server

Slide 14

Slide 14 text

2)Upload file from local to server • Go to GIT Hub Server to see if it’s upload File Name Description

Slide 15

Slide 15 text

• Modify some file – #vi example2016.txt • Modify anything – (compare different) • #git diff – Commit and git push • git commit -am "wrote something“ • git push 3)Modify file

Slide 16

Slide 16 text

• Go to Server and look • Go to see history 3)Modify file

Slide 17

Slide 17 text

• Make a folder – Create folder • # mkdir ./sample_test • # touch /sample_test/aaa.txt Note: under directory must have file else can’t push in – Git add folder • git add testfolder – #git add sample_test – #git commit -am "Add testfolder“ – #git push 4)Create folder

Slide 18

Slide 18 text

• Delete folder or file from local – Delete folder • #rm –rf folder – git commit -am “delete folder “ – Git push 5)Delete command

Slide 19

Slide 19 text

Additional Information • Don’t want to keep enter user and password of git? #git config --global user.name “chenchih" #git config --global user.email [email protected] • See your config after you add – #git config –list

Slide 20

Slide 20 text

Reference • http://rogerdudler.github.io/git-guide/ • http://gogojimmy.net/2012/01/17/how-to- use-git-1-git-basic/

Slide 21

Slide 21 text

No content