2020
10-08
10-08
git fetch与git pull的区别详解
gitfetch和gitpull都可以将远端仓库更新至本地那么他们之间有何区别?想要弄清楚这个问题有有几个概念不得不提。FETCH_HEAD:是一个版本链接,记录在本地的一个文件中,指向着目前已经从远程仓库取下来的分支的末端版本。 commit-id:在每次本地工作完成后,都会做一个gitcommit操作来保存当前工作到本地的repo,此时会产生一个commit-id,这是一个能唯一标识一个版本的序列号。在使用gitpush后,这个序列号还会同...
继续阅读 >
先看一段代码:fetch('http://localhost:3000/books?id=123456',{method:'get'}).then(function(value1){console.log(value1);return'hello';}).then(function(value2){console.log(value2);return'HelloWorld';})/*.then(function(data){console.log(data);returndata.text();})*/.then(data=>{console.log(data);})//接口app.get('/books',(req,res)=>{res.send('传统的URL传递参数!'+req.que...