-
Notifications
You must be signed in to change notification settings - Fork 328
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
some new aliases suggestions #55
base: main
Are you sure you want to change the base?
Conversation
4cf70a1
to
e1cc03d
Compare
e1cc03d
to
c1c7cdb
Compare
I saw my |
Yes. How about "'bb" because your idea is so useful, and "bb" doesn't conflict with anything else AFAIK? (Many teams use "br" as an alias for "branch"). Take a look at this code below, that aims for the same purpose, and see what you think of it:
|
That my point (and there is already
I have not been able to make it work :^( Plus there is some bashisms I'd like to avoid. git branch "$@" --format='%(refname:short) %(HEAD)%09%(objectname:short)%09%(contents:subject)'|
while read -r l
do
d=$(git config "branch.${l%% *}.description")
echo "$l${d:+ ($d)}"
done|
column -ts"$(printf \\t)" |
Yes the "br" alias is a glitchy one, in practice; when I coach teams that already have the "br" already, frequently the teammates feel unsettled by replacing/amending/altering it. Great point about avoiding bashisms. Your way is better than my way. Your new code is significantly better IMHO because it's much clearer. And the column command with tabs works well. If I forego the head star, commit hash, and subject, then the code could be be:
When I try the code on some of my own repos, your approach looks very good to me. The column table layout makes it very obvious which branches have descriptions, and which branches don't. What do you think? |
I don't mind the name of the alias (after all we all pick whatever is convenient for us from the I would have reserved |
c1c7cdb
to
7dabc91
Compare
51534e9
to
abc4bc1
Compare
99a600e
to
72ab030
Compare
bv
List branches along their description (or make
git be
more useful):fix
A shorthand to stash/rebase/unstash:
$ git fix 3f5b450
backup-branch
Backup current branch prior a dangerous (i.e.:
rebase
) operation: