[英]Firebase local code not in sync with live project
I am learning firebase, and I created the following example.我正在学习 firebase,并创建了以下示例。 I created a Cloud Function by uncommenting out the example and I pushed it to live:
我通过取消注释示例创建了一个 Cloud Function 并将其推送到现场:
const functions = require("firebase-functions");
// Create and Deploy Your First Cloud Functions
// https://firebase.google.com/docs/functions/write-firebase-functions
exports.helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello logs!", {structuredData: true});
response.send("Hello from Firebase!");
});
This code was pushed to live and then confirmed by the firebase gui.此代码被推送到现场,然后由 firebase gui 确认。 My issue is, when I invited another email to the project, ran firebase init from this email, and went through the brief setup instructions, the code was still commented out in the new local project.
我的问题是,当我邀请另一个 email 到项目中时,从这个 email 运行 firebase init,并在新的简要本地设置说明中进行了注释,代码仍然被注释掉。 What am I doing wrong here?
我在这里做错了什么? Is there some kind of firebase pull command where I can get the exact code from my project to local?
是否有某种 firebase pull 命令可以从我的项目中获取确切的代码到本地?
Running firebase init
does not get the existing code for a project.运行
firebase init
不会获得项目的现有代码。 If you want to share the code with a collaborator, you'll have to use another tool for that, such as github or gitlab.如果您想与协作者共享代码,则必须使用其他工具,例如 github 或 gitlab。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.