【发布时间】:2021-02-13 02:27:06
【问题描述】:
我在 git 中使用邮递员集合。 Postman 很多事情都做得很好,但the id regeneration that occur when you import 并不理想。
基本上导入邮递员集合,然后再次导出它会导致每个id 发生变化
例如git diff-index -p HEAD --的输出
@@ -2404,7 +2412,7 @@
{
"listen": "test",
"script": {
- "id": "60ff37a6-9bf7-4cb4-b142-2da49ff4b86e",
+ "id": "38c15d28-8382-4eaf-ad17-f053c143212d",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
我想检查文件中的更改并撤消所有 id 更改,但保留所有其他更改。
基本上我想自动运行 git add -p {my_postman.collection.json} 回答 n 到每一行并更改 id。
我可以看到Git command to programatically add a range of lines of a file to the index? 和Make git automatically remove trailing whitespace before committing 一样正确
【问题讨论】:
标签: git postman undo git-patch