First, install the runInTerminal extension.
Then, add the following to your keyboard shortcuts:
{"key": "cmd+shift+p","command": "runInTerminal.run","args": {"cmd": "git add . && git commit -m \"`date`\" --allow-empty && git push","match": ".*"}}
&&
will wait for the previous command to finish before executinggit add .
will add all files to be commitedgit commit -m \"`date`\" --allow-empty
will commit with the current date as a message even allowing commiting no changes (important if you’re just creating a branch without changes)git push
pushes the branch
Final note, I published this blog post with that keyboard shortcut :)