GitHub Copilot Usage

· 4 min read

Recently, a friend recommended GitHub Copilot, so I tried it with an open mind. After using it for a while, I found it quite good, so I’m sharing my experience here.

https://static.1991421.cn/2022/2022-10-30-125301.jpeg

Introduction

  • Pair programming tool based on OpenAI Copilot

Pricing

GitHub Copilot is a paid subscription model. If you want to apply for free use, there are 2 ways:

Free

GitHub Copilot is free to use for verified students, teachers, and maintainers of popular open source projects

  1. Student verification - 12 months free
  2. Maintainers of popular open source projects - main contributors - 12 months free
    • Currently, most online examples show main contributors of projects with 1k✨ or more

To verify if you qualify for free access, just visit the official website and click to get it. If you meet the requirements, you’ll see the following prompt. Also, if you’re nearing expiration and still qualify when you visit, you can continue to renew for free.

https://static.1991421.cn/2022/2022-12-25-114451.jpeg

If you don’t meet the above free conditions, you can only go with subscription, with prices as follows:

Subscription

  1. After paying for subscription, you get a 2-month free trial period, after which formal billing begins

    If you just want to try it out, you can choose subscription and cancel before formal billing starts

  2. Subscription price is $10/month or $100/year, and you can use payment methods like Visa card

    • Personally recommend monthly subscription

If you want to check current subscription status/validity status, visit this page

Usage Limitations

Since it’s paid, it’s necessary to understand if there are limitations

  • Currently no device number limit, meaning you can use it on multiple computers

Usage Thresholds

After obtaining usage eligibility, you’ll still face some usage thresholds

Network

To use GitHub/Copilot normally, you need healthy network connectivity, so you need to ensure your IDE or computer itself has proper proxy setup. If you can’t even access GitHub stably, then you won’t be able to use Copilot normally.

Practice

Once you cross the thresholds, you can start playing with it.

Installation

Copilot integrates into IDEs/editors as a plugin. Just install it for your commonly used IDE.

https://static.1991421.cn/2023/2023-04-08-000614.jpeg

Here using JetBrains WebStorm as an example:

  1. Install GitHub Copilot plugin

https://static.1991421.cn/2022/2022-10-30-123048.jpeg

  1. Choose login in the plugin

https://static.1991421.cn/2022/2022-10-30-123143.jpeg

  1. Follow installation prompts to open webpage, paste device code, and return to IDE after device connection success

https://static.1991421.cn/2022/2022-10-30-123306.jpeg

After seeing the above prompt, you can use it normally

Settings

During setup, there will be some settings, such as whether to allow contributing my code snippets. For company projects, it’s recommended to decline. Later, if you want to modify these settings, visit this page

https://static.1991421.cn/2023/2023-03-26-210501.jpeg

Usage

Current Copilot mainly assists programming through code completion.

  1. Trigger methods

    Multiple ways will trigger Copilot prompts. Press tab to select completion, or choose from suggestions on the right

    • Comment descriptions

      https://static.1991421.cn/2023/2023-04-10-235126.gif

    • Direct code writing

      https://static.1991421.cn/2023/2023-04-10-233825.gif

    • Comments support Chinese, but English is best, because OpenAI’s training model corpus is mainly EN. If you play with ChatGPT, you’ll find the same performance - English is best.

  2. Hotkey activation

    • Hotkeys for completion or switching suggestions can be customized in settings-plugin section. Default hotkeys are ctrl , ctrl .
    • Activate Copilot to show all hotkeys. For example, JB-type IDEs don’t have hotkeys by default, recommended to customize them

Personal usage style share

  1. Pair with ChatGPT, Copilot focuses on code completion reminders, acting as pair programming and Code Snippet, ChatGPT acts as half-expert for more comprehensive consultation
  2. Deliberately practice using English comments to recommend code, memorize hotkey activation

Cancel subscription

Visit https://github.com/settings/billing/summary, select cancel under Copilot

https://static.1991421.cn/2024/2024-04-04-234053.jpeg

Other

Copilot Labs

Copilot also has a Labs plugin, but it’s mainly experimental features like code explanation, code translation, testing, etc. VSC users can try it out. Other IDEs like JB haven’t listed this plugin yet.

https://static.1991421.cn/2023/2023-04-09-225041.jpeg

https://static.1991421.cn/2023/2023-04-09-224920.jpeg

Copilot X

Copilot recently held a big conference and announced the name change to Copilot X, meaning a powerful upgrade. GitHub will gradually release a series of Copilot features around open workflows, such as voice programming, chat Q&A, CLI, etc. Besides the functional forms being worth looking forward to, another reason is that X will be based on OpenAI’s latest model GPT4.

Currently, these are all in queue status. Interested parties can join the queue.

Waitlist

Others can check the official website

Similar competitors

Copilot is so strong that currently there are no real competitors. Currently only found similar products like the following. If concerned about Copilot pricing, you can try tabnine

Final Thoughts

That’s all for the introduction to Copilot. Currently, I’m already a moderate user. The reason I’m not considered a deep user is partly because the code quality generated by current Copilot isn’t very high, and partly because the product form is still too singular, so I’m really looking forward to the upcoming X.