Home/Blog/GitHub Advanced Features: Codespaces, Copilot, Projects, and More
Software Engineering

GitHub Advanced Features: Codespaces, Copilot, Projects, and More

Master GitHub advanced features including Codespaces for cloud development, Copilot AI assistance, Projects for planning, Discussions, Packages, Pages, and the GitHub CLI.

By Inventive HQ Team
GitHub Advanced Features: Codespaces, Copilot, Projects, and More

GitHub has evolved far beyond Git hosting. Today it's a complete development platform with cloud development environments, AI coding assistance, project management, package hosting, and more. This guide covers GitHub's advanced features that can transform your development workflow.

GitHub Codespaces

Codespaces provides cloud-hosted development environments—full VS Code in your browser or local VS Code connected to a cloud VM.

┌─────────────────────────────────────────────────────────────┐
│                  CODESPACES ARCHITECTURE                     │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   Your Browser/VS Code                                       │
│          │                                                   │
│          │ WebSocket connection                              │
│          ▼                                                   │
│   ┌─────────────────────────────────────────────────────┐   │
│   │              GitHub Cloud                            │   │
│   │  ┌─────────────────────────────────────────────┐    │   │
│   │  │            Codespace VM                      │    │   │
│   │  │  ┌──────────────────────────────────────┐   │    │   │
│   │  │  │  VS Code Server                      │   │    │   │
│   │  │  │  ├── Extensions                      │   │    │   │
│   │  │  │  ├── Language servers                │   │    │   │
│   │  │  │  └── Terminal                        │   │    │   │
│   │  │  └──────────────────────────────────────┘   │    │   │
│   │  │  ┌──────────────────────────────────────┐   │    │   │
│   │  │  │  Your Repository (cloned)            │   │    │   │
│   │  │  │  Docker, Node, Python, etc.          │   │    │   │
│   │  │  └──────────────────────────────────────┘   │    │   │
│   │  └─────────────────────────────────────────────┘    │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Creating a Codespace

# From GitHub.com
# 1. Navigate to repository
# 2. Click "Code" button
# 3. Select "Codespaces" tab
# 4. Click "Create codespace on main"

# From GitHub CLI
gh codespace create --repo owner/repo

# List your codespaces
gh codespace list

# Open in VS Code
gh codespace code --codespace <name>

Dev Container Configuration

Create .devcontainer/devcontainer.json:

{
  "name": "Node.js Development",
  "image": "mcr.microsoft.com/devcontainers/javascript-node:20",

  "features": {
    "ghcr.io/devcontainers/features/docker-in-docker:2": {},
    "ghcr.io/devcontainers/features/github-cli:1": {}
  },

  "customizations": {
    "vscode": {
      "extensions": [
        "dbaeumer.vscode-eslint",
        "esbenp.prettier-vscode",
        "ms-azuretools.vscode-docker",
        "GitHub.copilot"
      ],
      "settings": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      }
    }
  },

  "forwardPorts": [3000, 5432],
  "postCreateCommand": "npm install",
  "postStartCommand": "npm run dev",

  "remoteUser": "node"
}

Custom Dockerfile

.devcontainer/Dockerfile:

FROM mcr.microsoft.com/devcontainers/javascript-node:20

# Install additional tools
RUN apt-get update && apt-get install -y \
    postgresql-client \
    redis-tools \
    && rm -rf /var/lib/apt/lists/*

# Install global npm packages
RUN npm install -g pnpm turbo

# Pre-install dependencies for faster startup
WORKDIR /workspaces
COPY package*.json ./
RUN npm ci

.devcontainer/devcontainer.json:

{
  "name": "Custom Environment",
  "build": {
    "dockerfile": "Dockerfile",
    "context": ".."
  }
}

Codespace Prebuilds

Speed up Codespace creation with prebuilds:

  1. Go to Settings > Codespaces > Set up prebuilds
  2. Configure triggers (push to main, configuration changes)
  3. Prebuilds run in background, ready when you create Codespace

GitHub Copilot

Copilot is an AI pair programmer that suggests code in real-time.

Installation

  1. Subscribe at github.com/features/copilot
  2. Install extension:
    • VS Code: "GitHub Copilot" extension
    • JetBrains: "GitHub Copilot" plugin
    • Neovim: copilot.vim

Usage Patterns

Inline completions:

// Type a comment describing what you want
// Function to calculate the nth Fibonacci number
function fibonacci(n: number): number {
  // Copilot suggests the implementation
  if (n <= 1) return n;
  return fibonacci(n - 1) + fibonacci(n - 2);
}

Generate tests:

// Write: "test for fibonacci function"
describe('fibonacci', () => {
  it('returns 0 for input 0', () => {
    expect(fibonacci(0)).toBe(0);
  });

  it('returns 1 for input 1', () => {
    expect(fibonacci(1)).toBe(1);
  });

  it('returns 55 for input 10', () => {
    expect(fibonacci(10)).toBe(55);
  });
});

Generate documentation:

/**
 * Type this and let Copilot complete:
 * Calculates the nth Fibonacci number using recursion.
 * @param n - The position in the Fibonacci sequence
 * @returns The Fibonacci number at position n
 * @example fibonacci(10) // returns 55
 */

Copilot Chat

Copilot Chat provides conversational AI in your editor:

/explain   - Explain selected code
/fix       - Suggest a fix for problems
/tests     - Generate tests for code
/docs      - Generate documentation
@workspace - Ask about entire codebase

Keyboard Shortcuts

ActionmacOSWindows/Linux
Accept suggestionTabTab
Reject suggestionEscEsc
Next suggestionOption+]Alt+]
Previous suggestionOption+[Alt+[
Open Copilot panelCtrl+EnterCtrl+Enter

GitHub Projects

Projects is GitHub's project management tool with boards, tables, and roadmaps.

Project Views

┌─────────────────────────────────────────────────────────────┐
│                    PROJECT VIEWS                             │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   BOARD VIEW (Kanban)                                       │
│   ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐      │
│   │   Todo   │ │In Progress│ │  Review  │ │   Done   │      │
│   ├──────────┤ ├──────────┤ ├──────────┤ ├──────────┤      │
│   │ Issue #1 │ │ Issue #3 │ │ Issue #5 │ │ Issue #7 │      │
│   │ Issue #2 │ │ Issue #4 │ │          │ │ Issue #8 │      │
│   └──────────┘ └──────────┘ └──────────┘ └──────────┘      │
│                                                              │
│   TABLE VIEW (Spreadsheet)                                   │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ Title      │ Status    │ Assignee │ Sprint │ Points │   │
│   ├────────────┼───────────┼──────────┼────────┼────────┤   │
│   │ Issue #1   │ Todo      │ @alice   │ Sprint1│   3    │   │
│   │ Issue #2   │ In Progress│ @bob    │ Sprint1│   5    │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                              │
│   ROADMAP VIEW (Timeline)                                    │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ Jan        Feb        Mar        Apr                │   │
│   │ ═══════════                                         │   │
│   │    Feature A                                        │   │
│   │            ═══════════════                          │   │
│   │               Feature B                             │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Custom Fields

Add custom fields to track anything:

Field TypeUsage
TextNotes, descriptions
NumberStory points, estimates
DateDue dates, deadlines
Single selectStatus, priority, type
IterationSprints, milestones

Automation

Built-in automations:

# Auto-set status when PR is merged
When: Pull request is merged
Then: Set Status to "Done"

# Auto-add items from issues
When: Issue is added to project
Then: Set Status to "Todo"

# Auto-archive completed items
When: Status changes to "Done"
Then: Archive item after 14 days

Project Insights

Track project metrics:

  • Burn-up/burn-down charts
  • Items by status over time
  • Assignee workload
  • Sprint velocity

GitHub Discussions

Discussions provides community forums within repositories.

Discussion Categories

CategoryIconPurpose
Announcements📣Team/maintainer broadcasts
General💬Open conversation
Ideas💡Feature suggestions
Polls📊Community voting
Q&A🙋Questions with marked answers
Show and tell🙌Project showcases

Enabling Discussions

Settings > Features > Discussions

Best Practices

ISSUES                          DISCUSSIONS
──────                          ───────────
• Bugs to fix                   • "How do I...?" questions
• Feature requests (confirmed)  • Feature brainstorming
• Tasks with clear scope        • Announcements
• Actionable work items         • Community chat
                                • Polls and feedback

Convert Discussion to Issue:

  • Click "Create issue from discussion" when action is decided

GitHub Packages

Packages provides registry hosting for npm, Docker, Maven, NuGet, and more.

Publishing npm Package

.npmrc:

@myorg:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}

package.json:

{
  "name": "@myorg/my-package",
  "version": "1.0.0",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com"
  }
}

Publish:

# Login
npm login --registry=https://npm.pkg.github.com

# Publish
npm publish

Publishing Docker Image

# Login to GitHub Container Registry
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin

# Tag image
docker tag my-image ghcr.io/myorg/my-image:latest

# Push
docker push ghcr.io/myorg/my-image:latest

GitHub Actions workflow:

name: Publish Docker

on:
  release:
    types: [published]

jobs:
  push:
    runs-on: ubuntu-latest
    permissions:
      packages: write
      contents: read

    steps:
      - uses: actions/checkout@v4

      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push
        uses: docker/build-push-action@v5
        with:
          push: true
          tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}

GitHub Pages

Pages hosts static websites directly from repositories.

Quick Setup

  1. Settings > Pages
  2. Source: Deploy from a branch
  3. Branch: main (or gh-pages) / root (or /docs)
  4. Site available at username.github.io/repo

Custom Build with Actions

.github/workflows/pages.yml:

name: Deploy to Pages

on:
  push:
    branches: [main]

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install and build
        run: |
          npm ci
          npm run build

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./dist

  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy to Pages
        id: deployment
        uses: actions/deploy-pages@v4

Custom Domain

  1. Add CNAME file with your domain
  2. Configure DNS:
    • A records pointing to GitHub IPs
    • Or CNAME to username.github.io
# DNS records
A     185.199.108.153
A     185.199.109.153
A     185.199.110.153
A     185.199.111.153
# Or
CNAME username.github.io

GitHub CLI (gh)

The GitHub CLI brings GitHub to your terminal.

Installation

# macOS
brew install gh

# Windows
winget install GitHub.cli

# Linux
sudo apt install gh

Authentication

# Interactive login
gh auth login

# Check status
gh auth status

Common Commands

Pull Requests:

# Create PR
gh pr create --title "Feature" --body "Description"

# Create draft PR
gh pr create --draft

# List PRs
gh pr list

# View PR
gh pr view 123

# Check out PR locally
gh pr checkout 123

# Merge PR
gh pr merge 123 --squash

# Review PR
gh pr review 123 --approve

Issues:

# Create issue
gh issue create --title "Bug" --body "Description"

# List issues
gh issue list --label bug

# View issue
gh issue view 456

# Close issue
gh issue close 456

Actions:

# List workflow runs
gh run list

# View specific run
gh run view 789

# Watch run in progress
gh run watch

# Re-run failed jobs
gh run rerun 789 --failed

# Download artifacts
gh run download 789

Repository:

# Clone repo
gh repo clone owner/repo

# Create repo
gh repo create my-project --public

# Fork repo
gh repo fork owner/repo

# View repo in browser
gh repo view --web

Aliases

Create custom shortcuts:

# Add alias
gh alias set prc 'pr create --fill'
gh alias set prl 'pr list --author @me'

# Use alias
gh prc  # Creates PR with auto-filled title/body

API Access

# Make API requests
gh api repos/owner/repo/issues

# POST request
gh api repos/owner/repo/issues -f title="New Issue" -f body="Details"

# GraphQL
gh api graphql -f query='{ viewer { login } }'

Feature Comparison

FeatureFreeProTeamEnterprise
Codespaces120 hrs/mo180 hrs/mo180 hrs/moCustom
Copilot$10/mo add-on$10/mo add-on$19/user/mo$39/user/mo
ProjectsUnlimitedUnlimitedUnlimitedUnlimited
Discussions
PagesPublic repos+ Private+ Private+ Private
Packages500MB2GB2GB50GB

Need Expert IT & Security Guidance?

Our team is ready to help protect and optimize your business technology infrastructure.