Uninote
Uninote
用户根目录
每日点滴

<!DOCTYPE html> <html><head><meta http-equiv='Content-Type' content='text/html; charset=utf8'><title>编码规范</title> <script> var g_resRoot = '../../__res/'; var g_json_outline = '{"children":[{"children":[],"level":1,"lvNumber":"1","text":"git commit"},{"children":[],"level":1,"lvNumber":"2","text":"coding"},{"children":[],"level":1,"lvNumber":"3","text":"format"},{"children":[],"level":1,"lvNumber":"4","text":"重构 refactor"}],"level":0,"lvNumber":"","text":"编码规范"}'; </script> <link rel='stylesheet' type='text/css' href='../../__res/common.css'><style>.s0{color:#000000;} </style> </head><body> <script src='../../__res/util.js'></script><div id='outline'> <li><a href='#ol_0' style='font-weight:bold; font-size:22px'>编码规范</a></li> <li> <a href='#ol_1' >git commit</a></li> <li> <a href='#ol_2' >coding</a></li> <li> <a href='#ol_3' >format</a></li> <li> <a href='#ol_4' >重构 refactor</a></li> </div>

<pre id='ol_0' class='title'>编码规范</pre> <pre><d class='s0'><img src='..\pic\d17d1499708fcfb6cfb1e49b7011e0cc.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_1'>git commit</h1> <pre><d class='s0'>不要出现无意义的修改</d></pre> <pre><d class='s0'><img src='..\pic\d66f981958a3874666fe60073e599a67.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>一个commit一个task/work/任务</d></pre> <pre><d class='s0'>格式化、整理、删除代码(无用、注释。。)作为单独一个commit</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>拉取代码要用git pull -r</d></pre> <pre><d class='s0'>否则会形成merge环</d></pre> <pre><d class='s0'><img src='..\pic\cd7369230c3f95b0ca244e030631d5be.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>临时、未经测试的代码不要push到master分支</d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_2'>coding</h1> <pre><d class='s0'>不要在代码中写死绝对路径,要通配配置的形式:</d></pre> <pre><d class='s0'><img src='..\pic\48ebb624629293542493cda548ae5e9e.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>ps:可以通过下面的方式解析url:</d></pre> <pre><d class='s0'>js:new URL()</d></pre> <pre><d class='s0'>php:parse_url()</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>不要的注释都删除</d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_3'>format</h1> <pre><d class='s0'>格式化</d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_4'>重构 refactor</h1> <pre><d class='s0'>提取公共代码</d></pre> <pre><d class='s0'>删除注释、无用代码</d></pre> </body></html>

会议

git

点赞(0) 阅读(58) 举报
目录
标题