Where should I dump workarounds?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 30 14:13:15 PST 2016


On Wednesday, November 30, 2016 21:48:20 Johan Engelen via Digitalmars-d-
learn wrote:
> Tip: use both a GUI and the commandline. Without SourceTree [1],
> I would be nowhere near as effective with git.
>
> With rebasing, you'll end up having to force push. Force pushing
> is scary (because the repo state may have changed between you
> updating your local state and you pushing), so it's nicer to use
> --force-with-lease. [2]
> Make an alias for that:
> `git config --global alias.pushf "push --force-with-lease"`
> then you can do "git pushf" to force push rebased branches
> "safely". I can't remember the last time I used `git push
> --force`.

Really? I use git push -f all the time without problems. But I'm always
pushing to a branch that's for a PR on github. So, normally, no one would
have been doing anything with it but reviewing it or merging it, and after
it's merged, there isn't even a reason to keep the branch around. So,
forcing works great when dealing with PRs and github, but I wouldn't use it
for much else. Certainly, it isn't at all appropriate for anything that you
would normally expect folks to be branching from.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list