I would like to share with you my settings for git in iTerm2.
You can use
git add .,
git commit -m "",
git switch main,
git switch master and
git switch develop just by clicking one of these cuties.
Configuration is pretty straightforward, but it can take some time to figure out the first time you try it. So here is a little guide.
Open profiles -> Choose a profile ->
Edit profiles ->
Add Touch Bar Item, label it
git status, choose action
Send text with vim special characters. Then write
git status\n in the bottom field.
Repeat for every other git command you want. For
git commit write
git commit -m ""\u0002 in the bottom field. This will send the text
git commit -m "" to the console and then send a left arrow so the cursor is inside the quotes. Then you can write the commit message and press
Customize Touch Bar... and drag new commands to the touch bar.
That is all! Hope you find it useful.