Trong không gian làm việc đang mở, trong trình đơn View (Xem), hãy chọn Source Control (Kiểm soát nguồn) hoặc nhấn Ctrl-Shift-G (Cmd-Shift-G trong MacOS).
Nếu bạn đang dùng App Prototyping agent trong Prototyper
view, first click
Switch to Code to open Code view.
Xem biểu đồ Kiểm soát nguồn. Nếu có bất kỳ thay đổi nào chưa được xác nhận, hãy sử dụng một trong hai phương pháp sau để xác nhận các thay đổi đó cục bộ:
Trong ngăn Source Control (Kiểm soát nguồn):
Nhấp vào Cam kết.
Khi được nhắc dàn xếp các thay đổi, hãy nhấp vào Yes (Có).
Thêm một thông báo xác nhận mô tả các thay đổi của bạn trong tệp COMMIT_EDITMSG sẽ mở ra.
Lưu và đóng tệp.
Từ thiết bị đầu cuối:
Để xem các tệp chưa được xác nhận, hãy chạy:
gitstatus
Thêm các tệp vào chế độ kiểm soát nguồn:
Để thêm từng tệp, hãy chạy:
gitadd[listoffiles]
Để thêm tất cả các tệp chưa xác nhận, hãy chạy:
gitadd*
Xác nhận các thay đổi:
gitcommit-m"Your commit message describing the changes."
Trong ngăn Source Control (Kiểm soát nguồn), hãy nhấp vào Publish Branch (Xuất bản nhánh).
Khi được nhắc đăng nhập vào Git, hãy nhấp vào Cho phép rồi làm theo hướng dẫn để xác thực.
Sau khi bạn xác thực, hãy quay lại cửa sổ Firebase Studio rồi nhập tên cho dự án của bạn vào trường đang hoạt động, sau đó chọn một trong những lựa chọn sau:
Phát hành vào kho lưu trữ riêng tư trên GitHub để phát hành ứng dụng của bạn ở chế độ riêng tư trên GitHub.
Xuất bản lên kho lưu trữ công khai trên GitHub để xuất bản công khai ứng dụng của bạn trên GitHub.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["You can integrate Firebase Studio with GitHub to ensure that your projects\nare backed up and can be shared with others.\n| **Note:** If you're using the App Prototyping agent, note that it commits its changes to your local branch on every response. Firebase Studio in Code view requires you to manually commit changes after you make them. You can do this from the Source Control pane or from the Terminal in [Firebase Studio Code\n| view](/docs/studio/get-started-workspace).\n\nBefore you begin\n\n- [Create an account on GitHub](https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github)\n\nAdd your project to GitHub\n\nTo add your project to GitHub:\n\n1. In your open workspace, from the **View** menu, select **Source Control**\n or press `Ctrl-Shift-G` (`Cmd-Shift-G` in MacOS).\n\n If you're using the App Prototyping agent in\n Prototyper view, first click **Switch to Code** to open Code view.\n2. Review the Source Control graph. If there are any uncommitted changes, use\n either of the these two methods to commit them locally:\n\n - From the Source Control pane:\n\n 1. Click **Commit**.\n\n 2. When prompted to stage changes, click **Yes**.\n\n 3. Add a commit message that describes your changes in the\n `COMMIT_EDITMSG` file that opens.\n\n 4. Save and close the file.\n\n - From the Terminal:\n\n 1. To view uncommitted files, run:\n\n git status\n\n 2. Add the files to source control:\n\n - To add single files, run:\n\n git add [list of files]\n\n - To add all uncommitted files, run:\n\n git add *\n\n 3. Commit your changes:\n\n git commit -m \"Your commit message describing the changes.\"\n\n | **Warning:** Inspect the files that you plan to upload to GitHub to ensure you are not uploading any API keys or other secrets. Add any exclusions to the [`.gitignore`\n | file](https://docs.github.com/en/get-started/git-basics/ignoring-files).\n3. In the **Source Control** pane, click **Publish Branch.**\n\n4. When prompted to log into Git, click **Allow** and follow the instructions\n to authenticate.\n\n5. After you've authenticated, return to the Firebase Studio window and\n enter a name for your project in the active field, then select one of the\n following:\n\n - **Publish to GitHub private repository** to publish your app privately on\n GitHub.\n\n - **Publish to GitHub public repository** to publish your app publicly on\n GitHub.\n\n| **Tip:** We recommend uploading to a private repository at first. You can set the repository to public on GitHub at any time.\n\nNext steps\n\n- [Customize your Firebase Studio workspace](/docs/studio/customize-workspace).\n- [Create a custom template](/docs/studio/custom-templates)."]]