git commit current file #553
serpro69
started this conversation in
Templates Showcase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes I'm too lazy to open the vault in the terminal and do a commit for a single file, so I've made this very simple template that will commit the current file with a custom commit message.
It's nothing special as you can see, but quite handy at times, and also shows how one can use arguments with 'system command functions'
I've left the
git add
outside of the if condition as it makes things a bit more flexible, e.g committing several files, but in this case I'll probably not use the template.Requires two User System Command Functions:
git_add
:git add "$file"
git_commit
:git commit -m "$message"
Beta Was this translation helpful? Give feedback.
All reactions