-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
put alias error #37
put alias error #37
Conversation
gitalias.txt
Outdated
@@ -505,7 +505,7 @@ | |||
|
|||
# Do everything we can to synchronize all changes | |||
get = !git pull --rebase && git submodule update --init --recursive | |||
put = !git commit --all --message="$1" && git push | |||
put = "!f() { git add -A && git commit -m \"$@\" && git push; }; f" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a big difference between git commit --all
and git add -A && git commit
. Is the change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent point, thank you.
gitalias.txt
Outdated
@@ -505,7 +505,7 @@ | |||
|
|||
# Do everything we can to synchronize all changes | |||
get = !git pull --rebase && git submodule update --init --recursive | |||
put = !git commit --all --message="$1" && git push | |||
put = "!f() { git add -A && git commit -m \"$@\" && git push; }; f" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can I ask to fix minor style problem: two spaces before }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, i fixed.
Good discovery. Thank you. Definitely a bug. The intent of What are opinions on whether adding the "git add -A" is the typical thing for the typical case? If so, this would alter the alias, beyond just fixing the bug. Just doing a bug fix could be more akin to this:
|
I think
|
Another solution for accepting multiple arguments would be to turn them into several
|
The comment above the aliases says it will synchronise all changes so adding untracked files makes sense to me. Maybe it is better to change it with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm -0 about git add -A
and +1 on the style change.
Thanks all for comments! Here's feedback I received from a peer about principles:
Here's the fix code that seems to work for me, that's the closest to the syntax:
@berkin Do you want credit for this fix? If you do, can you adjust the PR to be just the fix? If you don't care, then let me know and I can do it. If you would like, you can do a subsequent PR to do the refactor of Thanks! |
the push command also run with the parameter and it gives error.