DEV Community

Cover image for Git cheatsheet inside VS Code
Dzhavat Ushev
Dzhavat Ushev

Posted on • Updated on • Originally published at dzhavat.github.io

Git cheatsheet inside VS Code

This post was originally published on my blog.


This has been long overdue.

Many developers, myself included, have a Terminal open inside VS Code where we run different Git commands. Oh, you do as well? I knew it! It happens sometimes that we need a particular command but don’t really remember it. What do we do in that situation? That’s right, we switch context! We leave the code editor just to be distracted by something else. And when we eventually come back with the answer, we also cary with us a bag of distractions.

Many of us also have our favorite Git cheatsheets that we consult in case of a need. And they come in all kinds of formats - bookmarks, printed on coffee/tea mugs, mouse pads, wall posters, socks, saved in pdfs, docs, written down on paper, sticky notes and what not.

We have our Git cheatsheets in all sorts of places but not in the most obvious one - INSIDE THE EDITOR.

So I’m here to bring some good news! πŸŽ‰

I made an extension that lets you open a Git cheatsheet inside VS Code! πŸš€

Here’s a little demo.

Demo of Git cheatsheet inside VS Code

Now you can have it right there where you most need it. You open it, you find your command, you continue your work. How easy is that? Of course, the bag of distractions is not included.

Currently there’s only one way to open it:

  • By pressing Ctrl+Shift+P (Win, Linux) / Cmd+Shift+P (Mac) and searching for the Open Git Cheatsheet command.

If you use Git and VS Code, please give it a try. I hope you find it useful.

Top comments (10)

Collapse
 
touhidulshawan profile image
Touhidul Shawan

Nice work πŸ‘ It will be great if you change style of commands like background to make differentiate them from other text. Is that possible?

Collapse
 
dzhavat profile image
Dzhavat Ushev

Thanks for trying it! Yes, it's totally possible. Will give it a try :)

Collapse
 
touhidulshawan profile image
Touhidul Shawan

Thanks. I hope it will update soon

Thread Thread
 
dzhavat profile image
Dzhavat Ushev

Hey, I just pushed an update to the extension where I added command highlighting. Do you find it useful?

Thread Thread
 
touhidulshawan profile image
Touhidul Shawan

Sorry for the late reply. I have already seen the update. Now I love it.

Collapse
 
pipawoz profile image
pipawoz

Amazing!
Did you use any program/plugin to develop the extension? Any resource to learn? Thanks!

Collapse
 
dzhavat profile image
Dzhavat Ushev

Thanks! I hope you'll give it a try :)

As for developing an extension, there's a really great CLI tool that can help you to get started. I can recommend the Your First Extension in the official VS Code docs. I started there and it's really easy to follow.

Collapse
 
thoriqmacto profile image
Thariq

thanks really helpful

Collapse
 
pfacklam profile image
Paul Facklam

Very useful to have it. Thanks for that. πŸ‘

Collapse
 
dzhavat profile image
Dzhavat Ushev

You're welcome. I hope you'll find it useful :)