question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

As a user, when I `gitmoji -c` with changes not staged, I get frustrated when I get an error after typing my message knowing I will need to type it again

See original GitHub issue

Hello @carloscuesta!

As a user, when I gitmoji -c with changes not staged, I get frustrated when I get an error after typing my message knowing I will need to type it again.

Issue:

My main problem with this is that sometimes I forget to git add the changes before trying commiting, so I call gitmoji -c and happily type my commit message, and when I’m done typing, I get a non-user-friendly error saying that I had nothing to commit, the problem here is that I don’t wanna type my message again.

So my proposal would be either:

  • save a cached version of what the user typed if there is an error with git, so that when I get an error, I type gitmoji -c again and the message is pre-filled, I can just press enter or I can even change it if it’s not what I want; or
  • check before beginning the inquiry If there are changes to commit, and if there aren’t any changes to commit, just throw a preemptive error so I don’t have to type anything to begin with.

OS: Ubuntu 16.04.7 LTS 16.04 xenial gitmoji -v: 3.2.16 Node version: v14.15.0

Error Message:

No error, it’s just a behavior I want to change 😄

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
carloscuestacommented, Aug 5, 2021

No worries! Published 4.5.0 with this improvement 👍🏼

1reaction
vhoyercommented, Aug 5, 2021

Oh, I guess it’s my fault for not reading the changelog… Thanks 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

c with husky pre-commit · Issue #700 · carloscuesta/gitmoji-cli
Hello again! And in 2, the terminal finishes with an error, saves the title/message in a file, and when the user types something...
Read more >
What does "Changes not staged for commit" mean
With Git Version 2.​​ "Changes not staged for commit" means Some changes are not staged. If you run these commands, all changes won't...
Read more >
Enjoy your commit with gitmoji-c - sa.nitawaki - Medium
My company has a 'gitmoj' culture. This is the practice of putting 'gitmoji' at the beginning of the commit message when committing. But...
Read more >
🔨 [git]: Write better commits with Gitmoji - DEV Community ...
Using emojis on commit messages provides an easy way of identifying the purpose or intention of a commit with only looking at the...
Read more >
gitmoji | An emoji guide for your commit messages
Gitmoji is an emoji guide for your commit messages. Aims to be a standarization cheatshee /t for using emojis on GitHub's commit messages....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found