Hey, I'd like to share with two git aliases which I've made special for MacPorts :)
cleanup = !git branch --merged origin/HEAD | grep -v ' -> ' | grep -v
'^\\*' | xargs -n 1 git branch -d
rebaseall = !git branch --no-merged | xargs -n 1 git rebase origin/HEAD
The first one simple removed all branches which was merged into master.
The second one rebases all branches to master.
My usual workflow after I've opened a lot of PR to cleanup everything is:
git rebaseall
git checkout master
git cleanup
--
wbr, Kirill
> On 23. Feb 2022, at 15:10, Joshua Root <[email protected]> wrote:
>
> Gerben Wierda wrote:
>
>> But I have been advised a pull is not enough, I should first do a fetch.
>
> If you're referring to my private reply, what I said was that a rebase was
> not enough to bring master up to date with upstream/master, you have to fetch
> as well.
>
> As per the git-pull man page:
>
> git pull runs git fetch with the given parameters and
> then depending on configuration options or command line flags, will
> call
> either git rebase or git merge to reconcile diverging branches.
>
> Our project policy is to avoid merge commits.
>
> - Josh
>
signature.asc
Description: Message signed with OpenPGP
