Version Control

Platform

Code Aliyun (https://code.aliyun.com/) is chosen as the platform for our version control.
Please sign up and send your username to me.

Policy

Always exchange files through Git.
Always revert unnecessary changes and make each commit “atomic”
Always use “rebase” rather than “merge”.

Deployment

../_images/deployment.png

Flow

for junior developers

operation of master

graph

operation of developer

command of developer

create a repo

../_images/flow00.png

edit and commit

../_images/flow01.png

push

../_images/flow02.png
../_images/flow03.png

clone

git clone git@code.aliyun.com:llhuang/???.git

create a new branch,
for example, test
switch to test
edit and commit
../_images/flow04.png

push

../_images/flow05.png
../_images/flow06.png

pull

git checkout -b test_id origin/test

switch to master
edit and commit
../_images/flow07.png

edit and commit

edit
git add
git commit
edit
git add
git commit
../_images/flow08.png

push

git push origin test_id

switch to test
pull and rebase
../_images/flow09.png

edit and commit

../_images/flow10.png

push

../_images/flow11.png
../_images/flow12.png

pull

git reset –hard origin/test

switch to master
edit and commit
../_images/flow13.png

edit and commit

edit
git add
git commit
edit
git add
git commit
../_images/flow14.png

push

git push -f origin test_id

switch to test
pull and rebase
../_images/flow15.png
edit and commit
“make a shortcut”
../_images/flow16.png
switch to master
rebase
../_images/flow17.png

push

../_images/flow18.png
../_images/flow19.png

pull

git checkout master
git pull (–rebase)
git branch -D test_id

for senior developers

operation of master

graph

operation of developer

command of developer

create a repo

../_images/flowSenior00.png

edit and commit

../_images/flowSenior01.png

push

../_images/flowSenior02.png
../_images/flowSenior03.png

clone

git clone git@code.aliyun.com:llhuang/xxx.git

edit and commit

../_images/flowSenior04.png
create a new branch,
for example, test
switch to test
edit and commit
git checkout -b test
edit
git add
git commit
edit
git add
git commit
../_images/flowSenior05.png

push

git push origin test

pull

../_images/flowSenior06.png
switch to test
edit and commit
../_images/flowSenior07.png

edit and commit

edit
git add
git commit
edit
git add
git commit

push

../_images/flowSenior08.png
../_images/flowSenior09.png
git pull –rebase origin test
(fix conflicts)
(git rebase --continue)
switch to master
edit and commit
../_images/flowSenior10.png

edit and commit

edit
git add
git commit
edit
git add
git commit
../_images/flowSenior11.png

push

git push origin test

pull

../_images/flowSenior12.png
switch to test
edit and commit
../_images/flowSenior13.png

edit and commit

switch to master
rebase
../_images/flowSenior14.png

push

../_images/flowSenior15.png
../_images/flowSenior16.png

pull

git pull (–rebase) origin test
git checkout master
git pull (–rebase)