如何将Postman与git存储库同步 [英] How do you sync Postman with a git repository

查看:724
本文介绍了如何将Postman与git存储库同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何将您的Postman配置与git存储库同步。

I'm wondering how you can sync your Postman config with a git repository.

我知道您可以将Postman导出并导入到文件夹中-可以-但我想知道是否还有更轻松的方法。

I know you can export and import from Postman to a folder - which is OK - but I wondered if there was something more effortless.

推荐答案

我不确定您是如何尝试使用此功能的,但有一些选择是:

I'm not exactly sure how you're trying to use this, but a few options would be:

使用其名为 newman 。您可以使用

to use their addon cli called newman. You can run collections from a URL or Local file with newman using

newman run http://some.url.here

然后,如果您将远程网址作为git存储库的一部分,则每次提交/拉

Then if you make the remote url a part of a git repository it would obviously update/change with each commit/pull

只有在您对过程感到满意的情况下,才应格外小心,这也可能与他们的使用条款不符,因此,我建议您先做一些研究就不要尝试

如果可以找到目录在其中保存了Postman集合的情况下,您可以使用命令行从计算机上的git存储库创建硬链接到您需要链接的目录或特定文件。每当您更改源文件时,Postman配置中的文件都会更改。

If you can find the directory in which the Postman collections are held, you could create a hard link with the command line from a git repository on your machine to the directory or specific file you need to link. Whenever you change the source file the one in the Postman config will change.

完成此操作的方式取决于您使用的系统和Postman的版本。

The way in which you accomplish this will depend on the system you use and version of Postman.

这篇关于如何将Postman与git存储库同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆