Is this git handling of a problem on my macports-ports fork&clone OK?
Kirill A. Korinsky
kirill at korins.ky
Wed Feb 23 14:13:35 UTC 2022
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 <jmr at macports.org> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20220223/74c074fa/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20220223/74c074fa/attachment.sig>
More information about the macports-users
mailing list