Refactoring with GitHub Copilot
1h 1mIntermediate2025-01-21
Authors

Gary Kovar
Senior Back-End Developer and Software Engineer
Course details
GitHub Copilot can create code, but it can also help you improve, clean up, and remove existing code. Refactoring is a crucial but often challenging aspect of maintaining applications, and Copilot can make it easier for you to explore how code changes might look. In this course, instructor Gary Kovar takes you through using Copilot in a few different situations, working with different aspects of programming. Learn how Copilot might (or might not) fit your set of challenges.
Learning objectives
Learn how to make small refactors in your PRs.
Find out how to use GitHub Copilot to help refactor code.
Be ready to defend larger refactors to your management and team.
Learning objectives
Learn how to make small refactors in your PRs.
Find out how to use GitHub Copilot to help refactor code.
Be ready to defend larger refactors to your management and team.
Skills covered
Github CopilotSoftware ArchitectureGitHubGenerative AIArtificial Intelligence FoundationsArtificial Intelligence (AI)Programming LanguagesSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Refactoring with the GitHub Copilot AI
- 02 - Prerequisites
- 03 - How to use Codespaces
1. GitHub Copilot and Refactoring Basics
- 04 - What is GitHub Copilot
- 05 - Chatting with Copilot
- 06 - Refactoring explained
- 07 - Code smells
- 08 - Refactoring strategies
- 09 - Refactoring with Copilot
2. Refactoring Techniques with AI
- 10 - Simplifying functionality
- 11 - Enhancing naming and readability
- 12 - Removing dead code
- 13 - Optimizing conditionals and loops
- 14 - Refactoring data structures
3. Advanced Refactoring for Long-Lived Code Bases
- 15 - Dealing with legacy code
- 16 - Refactoring for performance
- 17 - Considerations refactoring large code bases
- 18 - Refactoring and automated testing
4. Refactoring in the Real World
- 19 - How to convince your team to refactor
- 20 - Pay down technical debt
- 21 - Keep devs happy
- 22 - Lower TCO on the project
- 23 - The impact of ai on refactoring
Conclusion
- 24 - Next steps
Related courses
- GitHub Copilot Cert Prep by Microsoft Press
- Vibe Coding Fundamentals: Tools and Best Practices
- AI Pair Programming with GitHub Copilot
- Planning a Versioned RESTful API with GitHub Copilot
- AI Coding Agents with GitHub Copilot and Cursor
- Responsible GitHub Copilot: Creating Reliable Code Ethically
- Creating a Book Search Engine from Scratch Using Java and GitHub Copilot
- Complete Guide to GitHub Copilot for Developers by Microsoft Press