← Back to Mission Control

Copilot Pre-Flight Briefing

Preparing Your AI Co-pilot

Mission Phase 36 • Difficulty: Beginner

Mission Briefing

Welcome to Phase 6: Copilot in Command! You've mastered the fundamentals of Git and GitHub. Now it's time to enhance your capabilities with artificial intelligence.

Just as a spacecraft's autopilot system assists astronauts without taking control away from them, GitHub Copilot will become your intelligent co-pilot in the vast universe of version control. You remain in command, making all the critical decisions, while Copilot provides suggestions, automates routine tasks, and helps you navigate complex Git workflows with greater speed and confidence.

In this phase, you'll learn to configure and work with GitHub Copilot across multiple environments: VS Code, GitHub.com, and the command line interface.

Mission Objectives

Step 1: Installing Copilot in VS Code

First, let's get Copilot installed in your primary development environment:

1. Open VS Code
2. Press Ctrl+Shift+X (Cmd+Shift+X on Mac) to open Extensions
3. Search for "GitHub Copilot"
4. Select "Install" on the official GitHub Copilot extension
5. Also install "GitHub Copilot Chat" for enhanced features
6. Restart VS Code when prompted

Step 2: Authentication Process

Now let's authenticate Copilot with your GitHub account:

1. Open any code file and start typing
2. Copilot will prompt you to sign in
3. Select "Sign in to GitHub" 
4. Follow the browser authentication process
5. Ensure your GitHub account has Copilot access (subscription required)
6. Test by creating a new file and typing: // Function to calculate

Step 3: Configuration and Settings

Configure Copilot to work optimally for your workflow:

// Access VS Code Settings (Ctrl+,) and search for "copilot"

Key settings to review:
- GitHub Copilot: Enable
- GitHub Copilot: Inline Suggest Enable
- GitHub Copilot Chat: Enable
- GitHub Copilot: Advanced (for privacy settings)

Privacy Settings

Important privacy considerations:
- Review telemetry collection settings
- Understand data usage policies
- Configure content exclusion if needed
- Set up repository-specific settings for sensitive projects

Step 4: GitHub.com Integration

Enable Copilot features in GitHub's web interface:

1. Navigate to GitHub.com
2. Go to any repository
3. Press "." (period) to open web-based VS Code
4. Copilot should work automatically if properly authenticated
5. Test by editing files directly in the browser

Step 5: Testing Your Setup

Let's verify everything is working correctly:

Create a new file: test-copilot.js

Type these prompts and wait for suggestions:
- // Function to reverse a string
- // Create an array of prime numbers
- // Sort an array of objects by date

You should see AI-generated code suggestions appear!

Best Practices for AI Assistance

✅ Good Prompt Hygiene:

❌ Avoid These Pitfalls:

Understanding Copilot's Capabilities

What Copilot Excels At:

What Requires Human Oversight:

Mission Challenge

Your Task:

  1. Complete the Copilot installation and authentication process
  2. Create a simple JavaScript file with a few function stubs
  3. Use Copilot to complete at least 3 different functions
  4. Practice accepting, modifying, and rejecting suggestions
  5. Test the setup in both VS Code and GitHub's web editor

Mission Summary

Congratulations, Commander! You've successfully prepared your AI co-pilot for the missions ahead. You now have:

Key Achievements:

Next Mission: In the next chapter, you'll learn to use Copilot for generating professional commit messages that follow industry standards.