-
-
Save PapayaMedia/2c6883671377a66a171a3e5942a3de3d to your computer and use it in GitHub Desktop.
Quick git function qw for Fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function qw | |
set message "..." # This is the default message if none is provided. | |
if test (count $argv) -gt 0 # Check if there is at least 1 argument | |
set message $argv[1] # If there is an argument, use it for the message | |
end | |
# git add -A: Adds all the modifications, even deleted files and new files. | |
# git commit -m: Creates a commit with the default message or the message | |
# provided. | |
# git push: Push the commit to the default remote and branch. | |
# git status: Show the current status of the repo. This is useful when working | |
# with submodules, in case you forgot to commit the submodule modifications. | |
# Everything connected with && to execute each command only if the previous | |
# one was correctly executed. | |
git add -A && git commit -m $message && git push && git status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment