Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> “can be fast-forwarded”

I find this one annoying because I generally don't want to run `git pull` -- I almost never `git pull`, I usually just `git fetch` and update my branches as necessary. I do wish there was a built-in shortcut for "try to fast-forward this branch"; I often just do a rebase or a merge, which will do the right thing for a fast-forward, but won't fail if a fast-forward is impossible. I can do `git merge --ff-only`, but I would like it if `git fastforward` or `git ff` was available instead because for me it is such a common operation.

To forestall the obvious -- I don't like to make custom aliases or commands (though I've done it in the past) because it makes it harder to migrate between environments.



I believe you can set the default to be --ff-only then you only need to specify if you want to merge.

Despite knowing this is an option it's still hard for me to find decent documentation, but I think this is probably the best I found:

https://salferrarello.com/git-warning-pulling-without-specif...


That's even worse because it will just do the wrong thing when I'm on a different setup. At least with an alias the system can say "yeah, I ain't never heard of 'ff'" so I can fall back on a default.


  git ff
Very useful to make a git alias for that. When git bitches at my about the unknown command on the work servers I know I can just use the full merge command.


I have a shell alias for this: gff='git fetch && git pull --ff-only'


I don't mean any criticism but I'm genuinely curious: how often are you migrating between fresh git environments?


I’m not convinced this matters. It’s very important that some things be kept easy and accessible even if you don’t do them very often. I don’t call emergency services very often, but when I do, it had better be trivially easy. I don’t spin up a new server very often, but when I do, I need to be able to function there without immediately installing a bunch of config. I don’t help colleagues who need git assistance very often, but when I do, the last thing I need is to mess something up for them because all my aliases and defaults are missing.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: