我正在使用 React Native 开发一个 IOS 应用程序。
我的问题:
我有一台 Windows PC,我在其中编写大部分代码,还有一台运行 iPhone 模拟器的 Mac 笔记本电脑。 我在 Windows PC 上推送到 GitHub,并在 Mac 上手动获取 + 拉取,它会更新我的模拟器的视图。
我想设置某种方式让我的Mac在新代码进入主分支时自动获取+拉取,以节省我手动获取和拉取的时间。这可能吗?
我看到了其他一些类似的问题,但我没有找到任何对Mac有用的东西。
VS Code 可以帮助您。
来自https://code.visualstudio.com/docs/sourcecontrol/overview:
VS Code 能够定期从您的遥控器获取更改。这使 VS Code 能够显示本地存储库领先或落后于远程存储库的更改数量。此功能默认处于禁用状态,您可以使用 git.autofetch 设置来启用它。
来自https://code.visualstudio.com/docs/getstarted/settings:
// When set to true, commits will automatically be fetched from the default remote of the current Git repository. Setting to `all` will fetch from all remotes.
"git.autofetch": false,
// Duration in seconds between each automatic git fetch, when `git.autofetch` is enabled.
"git.autofetchPeriod": 180,