DEV Community

loading...
Cover image for Git cheatsheet inside VS Code

Git cheatsheet inside VS Code

Dzhavat Ushev
Front-end developer trying to make useful stuff.
Originally published at dzhavat.github.io Updated on ・2 min read

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.

Discussion (10)

Collapse
touhidulshawan profile image
Md. Touhidul Islam 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 Author

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

Collapse
touhidulshawan profile image
Md. Touhidul Islam Shawan

Thanks. I hope it will update soon

Thread Thread
dzhavat profile image
Dzhavat Ushev Author

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

Thread Thread
touhidulshawan profile image
Md. Touhidul Islam 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 Author

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 Author

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