a super quick way to commit code — git +Visual Studio Code
Before, I use to commit + push code manually by entering these 3 holy commands:
git add .
git commit -m "message"
git push
You will think typing these 3 won't take much time? But actually, let think about through a year, thousands of commits are done, adding up to a huge amount of your time, for what?
So I found out that I could simplify this process by using Gittens and VScode shortcut to finish the commit process in a few keystrokes
Map keyboard shortcut cmd + shift + G (you can try ctr + shift + G on Windows) to quickly focus on the commit message box
My new quick commit could be wrapped up in these steps:
cmd+shift+G => typing “commit message” => cmd + enter
The all the changes in source code are added, committed, and pushed right into the remote branch!
If you want to see how to do that, go to the details as follows:
- Map Ctr+shift+G / cmd+shift+G to autofocus on the source control panel, your cursor would be placed right in the message box
2. Set auto push after finishing commit message and hit “Command + enter” / Control+ enter”