powerpoint presentation€¦ · $ git init $ git add $ git status $ git commit $ git push $ git...

47

Upload: others

Post on 13-Jun-2020

166 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 2: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 3: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 5: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 6: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 8: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 9: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 10: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 11: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 12: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 13: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 15: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 16: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 17: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git init

$ git add <file>

$ git status

$ git commit

$ git push

$ git pull

$ git clone

Page 18: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 19: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 20: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

••

••

••

$ sudo apt-get install git

$ sudo yum install git

Page 21: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git --version

$ git config --global user.name "John Doe"$ git config --global user.email [email protected]$ git config --list

Page 22: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ cd /home/user/my_project

$ git init

$ git add .

$ git commit -m "Initial Commit"

$ git status

Page 24: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git status

$ git add .$ git commit -m "Readme file added"

Page 25: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ touch log.txt$ git status

$ touch .gitignore

Page 26: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 27: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 28: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git remote add origin {repo URL}$ git push -u origin master

Page 29: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git pull {name | origin} {branch name | master}

Page 30: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 31: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ sudo apt-get install git

$ git config --global user.name "John Doe"$ git config --global user.email [email protected]

Page 32: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ mkdir -p /home/<user>/git/playground$ cd /home/<user>/git/playground$ git clone {repo url}

$ git add -A$ git commit -m "Commit from server"$ git push origin master

$ git pull

Page 33: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install
Page 34: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 35: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 36: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

Page 37: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git branch

$ git branch <branch>

$ git branch -d <branch>

Page 38: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git branch -D <branch>

$ git branch -m <branch>

$ git branch -a

Page 39: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git branch crazy-experiment

Page 40: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git checkout crazy-experiment

Page 41: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

# Add remote repo to local repo config$ git remote add new-remote-repo https://github.com/user/repo.git

# pushes the crazy-experiment branch to new-remote-repo$ git push <new-remote-repo> crazy-experiment~

Page 42: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git branch -d crazy-experiment

error: The branch 'crazy-experiment' is not fully merged.If you are sure you want to delete it, run 'git branch -D crazy-experiment'.

$ git branch -D crazy-experiment

Page 43: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install

$ git push origin --delete crazy-experiment

$ git push origin :crazy-experiment

Page 47: PowerPoint Presentation€¦ · $ git init $ git add  $ git status $ git commit $ git push $ git pull $ git clone • • • • • • • • $ sudo apt-get install