DEV Community

Cover image for 10x Your Coding Productivity: The Ultimate GitHub Copilot Cheat Sheet
aLopes
aLopes

Posted on

10x Your Coding Productivity: The Ultimate GitHub Copilot Cheat Sheet

I used to think AI coding assistants were just glorified autocompletes. You know, the kind that just suggests console.log("here") when you are desperately trying to debug something.

But recently, while studying for a Microsoft Applied Skills credential, I had to completely change my perspective. I realized I was barely scratching the surface of what GitHub Copilot can actually do when you know how to talk to it.

I stopped using it just to finish my sentences and started using it as a true pair programmer. Here are the 3 features that genuinely changed my daily workflow—no fluff, just practical usage.

1. Protecting my "Flow State" (Ctrl + I)

Context switching is my worst enemy. The moment I leave VS Code to Google a specific RegEx pattern or check a documentation page, my focus is gone.

Now, I use the Inline Chat (Ctrl + I or Cmd + I). It opens a prompt exactly where my cursor is. I can just type: "Write a Python function that parses a CSV file and removes duplicate rows". Copilot generates the code inline. I review it, hit Accept, and I never even had to open a browser tab. It keeps me in the zone.

2. The "What does this even do?" button (/explain)

We have all inherited a project where the previous developer loved complex, nested logic that looks like ancient hieroglyphics.

Instead of spending an hour reverse-engineering someone else's code, I now highlight the block, open the Copilot Chat, and type /explain.
It breaks down the logic step-by-step in plain English. It is honestly like tapping a Senior Developer on the shoulder to ask a question, but without the guilt of interrupting their work.

3. Skipping the boilerplate with /tests

I know we are all supposed to love writing unit tests, but let's be real: setting up the mocks, the boilerplate, and mapping out edge cases is tedious.

Nowadays, I just highlight my function and type /tests.

// Example: A simple discount function
function calculateDiscount(price, couponCode) {
    if (couponCode === 'SUMMER20') return price * 0.8;
    if (couponCode === 'DEV10') return price * 0.9;
    return price;
}
Enter fullscreen mode Exit fullscreen mode

Copilot automatically maps out the edge cases (e.g., what if the coupon string is empty? what if it's invalid?) and generates the testing suite using my framework of choice. I just review the assertions, tweak what I need, and move on to the actual architecture of the app.


Where I am learning all of this (for free)

I am currently navigating my journey as a Microsoft Learn Student Ambassador, and my main goal right now is to deeply understand AI-assisted development.

The commands above are just a tiny fraction of the official Microsoft pathway. If you want to stop guessing and actually learn how to prompt Copilot properly—and earn a verified credential for your resume while you are at it—I highly recommend taking the hands-on lab I am studying right now.

👉 Click here to access the official Accelerate App Development with GitHub Copilot pathway

It is 100% free, created by Microsoft, and highly practical.

Top comments (0)