# AI git commit messages

**URL:** <https://forum.cursor.com/t/ai-git-commit-messages/1027>\
**Category:** Feature Requests\
**Created:** [October 12, 2023, 7:21am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027 "2023-10-12T07:21:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![loranger](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/loranger/32/427_2.png) [@loranger](https://forum.cursor.com/u/loranger)\
**Post date:** [October 12, 2023, 7:21am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/1 "2023-10-12T07:21:08Z")

</div>

Hi, I would love to use AI on my commit messages to automatically summarize the latest changes

---

<div class="post-metadata">

**Author:** ![fire](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/fire/32/96092_2.png) [@fire](https://forum.cursor.com/u/fire)\
**Post date:** [October 13, 2023, 3:15am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/2 "2023-10-13T03:15:21Z")

</div>

You can do this by using the @git context provider in cursor’s chat or edit components!

![image](https://us1.discourse-cdn.com/cursor1/original/1X/75e5db83198311e8983d87a7c5cd6ee96249488c.png)

e.g.,

 ![image](https://us1.discourse-cdn.com/cursor1/original/1X/e819924ae4af584ca6a88c871c797f1a9266c44f.png)

( use whatever prompt you want to direct it more to your liking, of course )

---

<div class="post-metadata">

**Author:** ![trefsoftware](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@trefsoftware](https://forum.cursor.com/u/trefsoftware)\
**Post date:** [October 27, 2023, 3:23pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/3 "2023-10-27T15:23:37Z")

</div>

For my future reference, here is the prompt posted:

> “Take a deep breath and work on this problem step-by-step. Summarize the provided diff into a clear and concise written commit message. Use the imperative style for the subject, use the imperative style for the body, and limit the subject types to 50 characters or less. Optionally, use a scope, and limit the scope types to 50 characters or less. Be as descriptive as possible, but keep it to a single line. Return a single code block. Ready to be pasted into commit edits without further editing.”

---

<div class="post-metadata">

**Author:** ![jjaimealeman](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jjaimealeman/32/1076_2.png) [@jjaimealeman](https://forum.cursor.com/u/jjaimealeman)\
**Post date:** [October 28, 2023, 6:37pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/4 "2023-10-28T18:37:47Z")

</div>

This is GOLD!!! 🥇

---

<div class="post-metadata">

**Author:** ![Logi](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@Logi](https://forum.cursor.com/u/Logi)\
**Post date:** [February 21, 2024, 4:49pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/5 "2024-02-21T16:49:16Z")

</div>

Would love to see this prefilled into the Source Control view’s commit message, when empty or filled with an AI-generated message, and updated whenever the git staged items change.

 ![Screenshot 2024-02-21 at 12.47.17 PM](https://us1.discourse-cdn.com/cursor1/original/2X/c/c6ad72064b790cef25900286ece17343d222fbf4.png)

---

<div class="post-metadata">

**Author:** ![myriam](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@myriam](https://forum.cursor.com/u/myriam)\
**Post date:** [March 19, 2024, 10:50am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/6 "2024-03-19T10:50:14Z")

</div>

+1 👐

---

<div class="post-metadata">

**Author:** ![mtf](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mtf/32/7788_2.png) [@mtf](https://forum.cursor.com/u/mtf)\
**Post date:** [March 20, 2024, 9:36pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/7 "2024-03-20T21:36:07Z")

</div>

The Copilot auto-generate version is in many cases not working well. I use the working state as well sometimes. But this does not differentiate between staged and unstaged changes unfortunately. Often when I have other pending changes I cannot use it.

+1 Having this as a cursor feature would be really great!

---

<div class="post-metadata">

**Author:** ![eugene](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eugene](https://forum.cursor.com/u/eugene)\
**Post date:** [March 25, 2024, 7:14am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/8 "2024-03-25T07:14:31Z")

</div>

+1 to this. 🙂

Having recently let Github Copilot expire after moving to Copilot++, I find myself missing the Copilot Commit message suggestions ✨ button.

Would love to see Cursor take this on too. 🙂

---

<div class="post-metadata">

**Author:** ![epicwhale](https://avatars.discourse-cdn.com/v4/letter/e/ee59a6/32.png) [@epicwhale](https://forum.cursor.com/u/epicwhale)\
**Post date:** [March 25, 2024, 7:12pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/9 "2024-03-25T19:12:36Z")

</div>

> [@trefsoftware](#):
>
> “Take a deep breath and work on this problem step-by-step. Summarize the provided diff into a clear and concise written commit message. Use the imperative style for the subject, use the imperative style for the body, and limit the subject types to 50 characters or less. Optionally, use a scope, and limit the scope types to 50 characters or less. Be as descriptive as possible, but keep it to a single line. Return a single code block. Ready to be pasted into commit edits without further editing.”

I absolutely miss this feature the most, while evaluating Cursor, and considering moving from Copilot!

---

<div class="post-metadata">

**Author:** ![epicwhale](https://avatars.discourse-cdn.com/v4/letter/e/ee59a6/32.png) [@epicwhale](https://forum.cursor.com/u/epicwhale)\
**Post date:** [March 25, 2024, 7:17pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/10 "2024-03-25T19:17:00Z")

</div>

More specifically, it would be useful to do this only for the ‘staged’ changes for the commit, like Github Copilot’s extension does.

---

<div class="post-metadata">

**Author:** ![carlosmoreira](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@carlosmoreira](https://forum.cursor.com/u/carlosmoreira)\
**Post date:** [April 2, 2024, 9:43pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/11 "2024-04-02T21:43:00Z")

</div>

This would be a nice feature after reviewing all the points of the code review, cursor could produce a nice commit message summarizing the changes.

---

<div class="post-metadata">

**Author:** ![Logi](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@Logi](https://forum.cursor.com/u/Logi)\
**Post date:** [April 10, 2024, 2:59pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/12 "2024-04-10T14:59:55Z")

</div>

AI commit messages are now possible (it was integrated into VSCode) by clicking the stars.

![Screenshot 2](https://us1.discourse-cdn.com/cursor1/original/2X/b/b4fac5e1066d5a182a75c89d83cb93f4a617b426.png)

But it would be cool if the message were prefilled and updated when:

1. the git stage changes, AND
2. only when the current commit message is either empty or AI generated (i.e. don’t overwrite a human provided input).

---

<div class="post-metadata">

**Author:** ![shivangg](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/shivangg/32/25071_2.png) [@shivangg](https://forum.cursor.com/u/shivangg)\
**Post date:** [April 12, 2024, 9:10am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/13 "2024-04-12T09:10:39Z")

</div>

This is not true. The star gets added by Copilot extension. It’s not a part of VS Code itself so the Cursor team will need to add it separately.

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/e/e246cbbd5e5916ec9c4eea307e0ee61f305d3810.png)

---

<div class="post-metadata">

**Author:** ![alexdonaldsonau](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@alexdonaldsonau](https://forum.cursor.com/u/alexdonaldsonau)\
**Post date:** [June 16, 2024, 12:27am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/14 "2024-06-16T00:27:48Z")

</div>

+1 to this request

---

<div class="post-metadata">

**Author:** ![kaddtec](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kaddtec](https://forum.cursor.com/u/kaddtec)\
**Post date:** [June 24, 2024, 2:38am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/15 "2024-06-24T02:38:09Z")

</div>

I agree this is a needed feature

---

<div class="post-metadata">

**Author:** ![seekwe](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/seekwe/32/2542_2.png) [@seekwe](https://forum.cursor.com/u/seekwe)\
**Post date:** [July 11, 2024, 11:25am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/16 "2024-07-11T11:25:38Z")

</div>

This function is required

---

<div class="post-metadata">

**Author:** ![gbdr](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/gbdr/32/8102_2.png) [@gbdr](https://forum.cursor.com/u/gbdr)\
**Post date:** [July 22, 2024, 5:02pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/17 "2024-07-22T17:02:08Z")

</div>

need this feature too

---

<div class="post-metadata">

**Author:** ![mtf](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mtf/32/7788_2.png) [@mtf](https://forum.cursor.com/u/mtf)\
**Post date:** [August 18, 2024, 6:26pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/18 "2024-08-18T18:26:47Z")

</div>

Any movement here?  
This should be quite easy to implement…

I know I can use the @git feature, but this only let’s you add unstaged changes. A shortcut that generates a commit message based on the staged changes would be so great! 🙂

---

<div class="post-metadata">

**Author:** ![Spiderbezno](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Spiderbezno](https://forum.cursor.com/u/Spiderbezno)\
**Post date:** [September 10, 2024, 3:15am UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/19 "2024-09-10T03:15:02Z")

</div>

Will be very useful this feature

---

<div class="post-metadata">

**Author:** ![hugodemenez](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/hugodemenez/32/5009_2.png) [@hugodemenez](https://forum.cursor.com/u/hugodemenez)\
**Post date:** [September 16, 2024, 2:17pm UTC](https://forum.cursor.com/t/ai-git-commit-messages/1027/20 "2024-09-16T14:17:34Z")

</div>

If it could be directly used like with copilot AI generated message it would be awesome. And also being able to add a custom prompt for generating the message would be lit !

[Next page](https://forum.cursor.com/t/ai-git-commit-messages/1027.md?page=2)
