![]() The sad truth is that this will in fact get used. But such microcommits should be squashed before merging and the commit message should state why the change was made. With microcommits you are essentially using version control as a more powerful undo button. If you are doing microcommits to your local repository and there is no individual "why" than this may be useful. When the AI will have that context it will just pick up tasks, make the changes and commit by itself without human intervention.Ĭommit messages that describe the what are of course still better than "First commit" "Second commit". This requires a lot of context which the AI is never fed. It should probably be something like "Fixing overflow bug CVE-xxxxx" thereby explaining why the change was needed. The commit message probably shouldn't be "Adding bounds check". Say you are adding a bounds check to some operation. Don\'t start it with "This commit", just describe the changes.". Your prompt for the description is "Add a short description of **what **commit is about after the commit message. Was there a business need? Was there a bug? The changes are already obvious from the diff. You are meant to state WHY they were made in the first place. You are not supposed to summarize the changes. If you’re using Warp as your terminal, you can use Warp’s AI Command Search feature to surface the various commands to check history discussed above.Through your comment, you demonstrate that you are missing the point of the commit message. Use AI to recall these various git commit history commands By default, this tool keeps the record for 90 days and lets you return to old commits not referenced by any branches. ![]() Unlike git log, git reflog is a local recording of changes made and tracks commits across every branch. These commits may not show up when calling git log, but you may be able to recover it using git reflog. With Git, it's possible to lose a commit by accidentally using commands like git reset -hard or through Git's garbage collection which removes unreferenced objects from the repository. There may be instances when you use git log but the commit you are searching for is not showing up. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |