For good or bad, my current Git workflow does not include merges, but rebasing.
It keeps the history cleaner, works with the established workflo...
For further actions, you may consider blocking this person and/or reporting abuse
And why not just shell aliases instead? Unless you're switching between shells, I don't see the point of using
git st
rather thangs
orgst
...I use
oh my zsh
and git aliases that comes along. But at times type in the whole command atleast once in a week so I don't forget them.Whatever floats your boat.
I like git aliases because they help with separation of concerns and keep my
.aliases
file a little less bloated.You can display version history on github in Insights/Network.
tl;dr
I don't agree with fast-forward merges aka rebase with no merge. For me, a branch is a separated idea and master is a collection of references to those ideas.
long
I understand that a flat (rebase) git-flow with history manipulation makes sense for usage with git in bash where the commit history is displayed in a linear fashion. However, I don't agree that this approach is better, compared to a two dimensional (merge) git-flow in a visual git. Also changing the Feature's commit history even slightly makes it difficult, for a reviewer, to understand your mind flow and reasoning.
I was on a project, where everyone squashed their branches to a single commit before rebasing onto a master and I can tell you, you don't want to review this.
Compare with this
(BTW, you can always use
--first-parent
to hide branch commits.)An excellent quote from etcwilde
Excellent points! I am actually in favor of merge commits, but my teams current workflow does not use them. It's something that I would like to try and get added into our git workflow, but we'll see ¯_(ツ)_/¯
The quote from etcwilde is a great example! Also thanks for pointing out where the visualization was at on gitub, just kinda wish it had a great commit range on it.
Nice. Hey, give —fixup commits a shot. after while commit messages are like “fixup: fixup: fixup: feature” , but after interactive rebase it is all nice.
Ad aliases: i am not friend of them, i try to use as little as posible of them, because when ine use aliases, it make him forgot command it stands for.
i only use my “git tree” to pretty oneline log and some forcepushes to specified branches
edit: here are my only aliases:
if i should have onyl one, it is tree
I agree, we'll get used to our own environment and then when we use someone else's we forget what the commands stand for.
The ones you listed seem to be the 'basic' aliases you should have to make your work easier.
Yes! :) exactly...
you are on another computer (your prod server) and you need to do something in git. if you use all heavy aliases, then you just can't do anything, because in fact, you do not know how to git :D :)
yes, listed ones are absolutelly basic for me
Here is ...everyone else aliases, that uses bash-it I mean.
I'm tired to say what is wrong in having custom personal aliases and shortcuts, instead I just give this link :))
My new favorite alias is fixup --amend. Lets you amend to a specific commit, not need to be the latest one.
Found this gem at GIT FIXUP: --AMEND FOR OLDER COMMITS
Thanks for sharing, this is definitely something I will be checking out.
The first git alias I would like to share is
git aliases
:The one I could not live without is a
git log
alias:I often use a
git oops
and agwip
andgunwip
(available in git plugin for oh-my-zsh):And the very classical
gapa
andgst
:(note: some are git aliases, some are bash aliases)
I use the alias from git plugin (oh my zsh)
gst for git status for example
It's pretty cool
oh-my-zsh has the coolest git alias ever.
Complex ones but handy
I don't use any git aliases because I don't like to rely on them on foreign systems. At odds with that, I have a bunch of wrapper scripts which are workflow- or project-specific which I use all the time :)
Congrats for the great post Christine!! I loved it
Agreed. But you then also need to merge with --no-ff to avoid polluting your master. Renaming for public branches rebase is also a must to avoid push force drama.
For aliases and shell/git configuration, a few pearls:
github.com/zsh-users/antigen
with oh-my-zsh/git and others according to your tastes. (♥ gloga)
grml.org/zsh/
github.com/zsh-users/zsh-autosugge...
github.com/iam4x/zsh-iterm-touchbar
--rebase by default on git pull is comfortable too.
And obviously for those that didn't know it:
learngitbranching.js.org/
I like prettying up the log to make it a bit more palatable, here's an example (not mine).
Thanks for the post Christine. We rebase where I work as well. Here's my aliases, gitaliases.iamdeveloper.com.
Ooh nice, I think I will add a couple of these onto my file too!
heres mine
gitlab.com/ramlevdk/zsh-plugins/bl...
and
gitlab.com/ramlevdk/dotfiles/blob/...
I did not know about ‘git diff --patience’ until today. Thanks Christine!
I have a few aliases that I find useful.