简体   繁体   English

Firebase 本地代码与实时项目不同步

[英]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.

相关问题 Firebase Crashlytics 不与我的 android 项目同步 - Firebase Crashlytics do not sync with my android project 使用 firebase 切换实时应用程序的功能 - Toggling features of a live app with firebase Firebase Firestore 自定义同步规则 | Flutter - Dart - Firebase Firestore custom sync rules | Flutter - Dart firebase 消息处理与本地通知 - firebase messaging handling with local notification Firebase 以非零退出代码(项目路径中的空格)开头的部署错误 - Firebase deploy errors starting with non-zero exit code (space in project path) firebase 无法确定项目id - firebase cannot determine project id 在 Android 中添加 Firebase Crashlytics 时生成同步错误 - Build sync error while adding Firebase Crashlytics in Android 当我尝试在本地 DynamoDB 上启用“生存时间”时出现 UnrecognizedClientException 错误 - UnrecognizedClientException error when I try to enable "time to live" on local DynamoDB 我是否需要 Firebase 项目才能使用 Firebase App Check? - Do I need a Firebase project to use Firebase App Check? 如何从另一个 firebase 项目写入 firebase 数据库? - How to write in firebase database from another firebase project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM