-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(git-aliases): add checkout with username (fixes #1712) #1732
Conversation
this can be useful for creating a branch with a common prefix
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.
Nice one @georgettica 😄
I left you a small comment, you can take look
aliases/available/git.aliases.bash
Outdated
@@ -65,6 +65,7 @@ alias gco='git checkout' | |||
alias gcom='git checkout master' | |||
alias gcb='git checkout -b' | |||
alias gcob='git checkout -b' | |||
alias gcobu="git checkout -b ${USER}/" |
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.
Please use single quote instead of double quotes to match the rest of the file
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 want to, but ${USER} won't expand if it's single quotes
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.
Hmm, @georgettica how have you tested this?
in my local:
$ alias test='echo ${USER}/'
$ test
davidfa/
$ alias test
alias test='echo ${USER}/'
$ export USER=boo
$ test
boo/
This is in bash 5.0.7 on MacOS
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.
maybe it's me being silly. thanks so much @davidpfarrell .. seems it works and I was shooting from the hip. fixing now
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.
FYI, will create a subsequent req to fix all the double quotes to single quotes in the file
@georgettica great job! I am looking forward for your fix PR on this file- if you could also reorder the aliases and reorganize them it would be amazing! |
Yeah, I would do that even if you wouldn't ask. |
…ash-it#1732) * feat(git-aliases): add checkout with username this can be useful for creating a branch with a common prefix * fix(git-alais): change quotes
this can be useful for creating a branch with a common prefix
fixes #1712