version control systems academy.zariba.com 1. lecture content 1.what is software configuration...

13
Version Control Systems academy.zariba.com 1

Upload: raymond-lang

Post on 01-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

1

Version Control Systems

academy.zariba.com

Page 2: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

2

Lecture Content

1. What is Software Configuration Management?

2. Version Control Systems (VCS)3. Basic Git Commands4. Merging and Branching5. Creating a repository6. Simple Phaser Demo7. Source Tree8. VCS in WebStorm

Page 3: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

3

What is SoftwareConfiguration Management (SCM)?

• SCM’s task is to keep track and controlling changes in the software.

• Revision Control, Source Control and Version Control.

Page 4: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

4

Version Control Systems (VCS)

Page 5: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

5

Workflow

• Basically, the workflow goes like this:

• After that you can push your files from the HEAD to the remote master (or branch).

Page 6: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

6

Creating a repository

Page 7: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

7

Basic git commands

git init – create a new git repository.git remote add origin <address> - connect your repository to a remote server.git clone <address> - clone a repository from a remote server.git add <filename> - add specific file/files to the index.git add . – add all modified files to the index.git commit –m “message” – commit files to the HEAD with a specific message.git push origin master – send the changes from the HEAD to the server.git tag <version> <commit> -

tagging a specific commit with a version.git log

--author=vankata

--pretty=oneline--graph --oneline --decorate --all--name-status

- check the repository history.git checkout -- <filename> - replace changes in the working tree with the last content in HEAD.git fetch origin – download locally the latest origin master.git reset --hard origin/master – reset the local master to remote origin master.

Page 8: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

8

Merging and Branching

• git checkout –b <branchname> - create a new branch.

• git push origin <branchname> - push changes to branch

• git checkout master – switch back to master

• git branch –d <branchname> - delete branch

• git pull – update your local repository to the newest commit.

• git merge <branch> - merge your local repository to a specific branch

• git diff <branchname> <branchname> - preview differences in branches

Page 9: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

9

Simple Phaser demo

1. Create a simple demo with Phaser

2. Initial commit of the project

3. Preview of the basic Git Commands

Page 10: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

10

Source Tree

Page 11: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

11

VCS in WebStorm

Page 12: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

12

References

1. http://rogerdudler.github.io/git-guide/

2. https://en.wikipedia.org/wiki/Software_configuration_management

Page 13: Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git

13

Zariba Academy

Questions