Will the copilot always run after every commit to origin? #202873
🏷️ Discussion TypeQuestion 💬 Feature/Topic AreaCopilot in GitHub BodyI'm reading through the GitHub Copilot documentation pages, learning more about how to use this fascinating new tool! Right now, I'm reading through the pages dealing with First, I conclude that the GitHub Copilots will run after every commit to the remote repo. Am I correct about that? Second, assuming the answer to my first question is yes, then how can I prevent that from happening after every push to remote? When I am working alone, I tend to perform frequent commits to my local repo and then pushes to remote. I do this so that I have a clear view of how my thinking has progressed over time. But I don't want every push to remote to trigger Copilot to run. That would just burn through my tokens quicker than I care for that to happen. |
Replies: 1 comment 2 replies
|
Great questions! Let me clarify both points:
No, not exactly. GitHub Copilot doesn't automatically trigger on every commit. The .github/copilot-instructions.md file serves as a configuration file for Copilot's behavior when YOU use it in your IDE/editor, not as an automated trigger that runs on commits. Copilot runs when: You're actively using it in your code editor (VS Code, JetBrains, etc.) It does NOT run automatically on every push to remote as a CI/CD action.
Since Copilot doesn't auto-trigger on commits, you can control usage by: In your IDE: Disable Copilot when you're doing frequent local commits For GitHub Codespaces: Disable Copilot in Codespaces settings if you want to preserve tokens GitHub Copilot for Enterprises: If using enterprise licenses, token usage is typically monthly If you're worried about token burn-through, you can: Enable Copilot only when you need significant help |
Great questions! Let me clarify both points:
No, not exactly. GitHub Copilot doesn't automatically trigger on every commit. The .github/copilot-instructions.md file serves as a configuration file for Copilot's behavior when YOU use it in your IDE/editor, not as an automated trigger that runs on commits.
Copilot runs when:
You're actively using it in your code editor (VS Code, JetBrains, etc.)
You invoke it manually or let it suggest completions
You're in a GitHub Codespaces environment
It does NOT run automatically on every push to remote as a CI/CD action.
Since Copilot doesn't auto-trigger on commits, you…