Never writing a commit msg again | by Tibo - 240🔥

Tibo - 240🔥


27 days ago

View on Twitter

Never writing a commit msg again Just added this "CMD-Enter" shortcut to auto-push all my changes with an AI-generated commit message Yes I am lazy 😅 Sharing the setup 👇

This is based on @levelsio "Cmd-enter" empty push: Great way to save time imo But empty commit messages are hardly compatible with teams... So I refused to do the same for me, until ....

@levelsio ... I found this: from @m1guelpf => AI-generated commit based on OpenAI Codex So here is how to set it up with and use it with Cmd-Enter: (This is for Mac with Visual Studio Code but I guess the logic could work everywhere)

@levelsio @m1guelpf 1. install auto-commit Follow the instructions here: note: I added my OpenAI key in my .zprofile file so it stays in path

@levelsio @m1guelpf 2. create the push script Create a file for this super simple script: git add . && \ auto-commit && \ git push Name this file Place the file in /usr/local/bin so it's automatically in your PATH

@levelsio @m1guelpf 3. enable the shortcut a) on Visual Studio Code, Install the "Command Runner" extension (from edonet) b) go in "shortcut settings" (preference -> keyboard shortcuts), and open the keyboard shortcut file (button on the top right)

@levelsio @m1guelpf c) add this shortcut { "key": "cmd+enter", "label": "generate commit and push", "command": "", "args": {"command": "sh"}, "when": "editorTextFocus" }

@levelsio @m1guelpf That's it! You should now be able to press "CMD-Enter" to commit and push. Enjoy

More from @tibo_makerReply on Twitter

Page created with TweetHunter

Write your own
No result found for @magnoliaheartc. Check the filters or change your query.