Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

When running azd x init, generated extension projects lacked .gitignore files, requiring manual creation for each new extension.

Changes

Added language-specific .gitignore templates to extension scaffolding directories:

  • Go: bin/ directory and standard Go patterns (already existed, updated to explicitly list bin/)
  • Python: bin/, build/, generated_proto/, virtual environments, bytecode
  • JavaScript: bin/, generated/, node_modules/
  • C#: bin/, obj/, Visual Studio user files

Templates are automatically copied during azd x init via existing copyAndProcessTemplates logic in init.go. No code changes required.

Example: After running azd x init --language python, the generated project now includes:

# Build output directory
bin/

# PyInstaller build artifacts
build/
dist/

# Generated protobuf files
generated_proto/

# Node modules
node_modules/
...

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd x init --no-prompt --id test.extension --name Test Extension --capabilities custom-commands --language python (dns block)
    • Triggering command: ./azd ext --help (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[extension] azd x init should generate a .gitignore with sensible defaults to improve dev experience</issue_title>
<issue_description>When initializing a new extension, some folders should be ignored by Git. Generating the .gitignore file would save the extension developer some time and improve the experience.

Something like this:

Go

bin/

Python

bin/
build/
generated_proto/

Javascript

bin/
generated/
node_modules/

C Sharp

bin/
obj/

</issue_description>

<agent_instructions>Update the azd x init command in the developer extension to include a per language .gitignore file that gets added to the project output along with each generated sample project.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add .gitignore generation for azd x init command Add .gitignore templates to extension language scaffolding Nov 18, 2025
Copilot AI requested a review from wbreza November 18, 2025 00:20
Copilot finished work on behalf of wbreza November 18, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[extension] azd x init should generate a .gitignore with sensible defaults to improve dev experience

3 participants