diff --git a/src/fastapi_cloud_cli/commands/deploy.py b/src/fastapi_cloud_cli/commands/deploy.py index 18146784..03e26fca 100644 --- a/src/fastapi_cloud_cli/commands/deploy.py +++ b/src/fastapi_cloud_cli/commands/deploy.py @@ -51,6 +51,7 @@ def _should_exclude_entry(path: Path) -> bool: "__pycache__", ".mypy_cache", ".pytest_cache", + ".git", ".gitignore", ".fastapicloudignore", ] diff --git a/tests/test_archive.py b/tests/test_archive.py index 1d3b232a..e74d8eb1 100644 --- a/tests/test_archive.py +++ b/tests/test_archive.py @@ -125,6 +125,7 @@ def test_archive_respects_fastapicloudignore_unignore( # Rignore needs a .git folder to make .gitignore work (src_path / ".git").mkdir(exist_ok=True, parents=True) + (src_path / ".git" / "config").write_text("[core]\n\trepositoryformatversion = 0") (src_path / ".gitignore").write_text("ignore_me.txt\nbuild/") (src_path / ".fastapicloudignore").write_text("!static/build")