9
# VERSION CONTROL

# VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

# VERSION CONTROL

Page 2: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

What is version control?

• Tracking changes to the source code

Page 3: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

Why do we need version control?

Version control will save your life if

• You find a error and want to locate what change in

the source code causes this error

• You work in a team and need to share the changes

with team members

Page 4: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

Why do we need version control?

Version control will save your life if

• You find a error and want to locate what change in

the source code causes this error (revert and roll

back)

• You work (need to know who changed what,

resolve conflicts)

Page 5: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

What are typical version control system?

• Git ……

• GitHub is a repository hosting service for Git. Public

repository free; private repository not free.

• Visual Studio Team Service (VSTS) is something

similar to GitHub but free.

Page 6: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

How to use version control system?

Visual Studio

Team Service

Cloud

Your Laptop

Page 7: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

Terminology

• Repository: a data structure where all the current and history

data of the source code are stored.

• Clone: creating a repository containing their revisions from

another repository; equivalent to pushing or pulling into an

empty (newly initialized) repository

• Pull, Push: copy revisions between local repository (on your

laptop) and remote repository (on VSTS cloud)

• Commit, update: merge changes between working copy and

local repository

• Conflict: occurs when the system is unable to reconcile the

changes in the same document made by different people

Page 8: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

Best Practices • One commit often and semantically (every

committed revision gives you a rollback position)

• Don’ commit half-done work

• Test and inspect all changes before commit

• Write good commit messages (bad examples: some

shit, it works, fixed a bug, updated)

• Version control is not a backup system

https://www.git-tower.com/learn/git/ebook/en/command-line/appendix/best-practices

https://www.troyhunt.com/10-commandments-of-good-source-control/

Page 9: # VERSION CONTROL - WordPress.com · 2017-10-10 · Terminology • Repository: a data structure where all the current and history data of the source code are stored. • Clone: creating

To Do

• Configure version control in visual studio

• Make subscription to Azure Cloud

• Configure DB server on Azure

• Change DB credential in source code

• Deploy sample app