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¶
Flow¶
for junior developers¶
operation of master
graph
operation of developer
command of developer
create a repo
edit and commit
push
clone
git clone git@code.aliyun.com:llhuang/???.git
create a new branch,for example, testswitch to testedit and commitpush
pull
git checkout -b test_id origin/test
switch to masteredit and commitedit and commit
editgit addgit commit…editgit addgit commitpush
git push origin test_id
switch to testpull and rebaseedit and commit
push
pull
git reset –hard origin/test
switch to masteredit and commitedit and commit
editgit addgit commit…editgit addgit commitpush
git push -f origin test_id
switch to testpull and rebase edit and commit“make a shortcut” switch to masterrebasepush
pull
git checkout mastergit pull (–rebase)git branch -D test_id
for senior developers¶
operation of master
graph
operation of developer
command of developer
create a repo
edit and commit
push
clone
git clone git@code.aliyun.com:llhuang/xxx.git
edit and commit
create a new branch,for example, testswitch to testedit and commit git checkout -b testeditgit addgit commiteditgit addgit commitpush
git push origin test
pull
switch to testedit and commitedit and commit
editgit addgit commit…editgit addgit commitpush
git pull –rebase origin test(fix conflicts)(git rebase --continue) switch to masteredit and commitedit and commit
editgit addgit commit…editgit addgit commitpush
git push origin test
pull
switch to testedit and commitedit and commit
switch to masterrebasepush
pull
git pull (–rebase) origin testgit checkout mastergit pull (–rebase)