[remote "origin"]
    url = .
    fetch = +refs/heads/*:refs/remotes/origin/*
    push = refs/heads/main ; this should be ignored
    push = refs/heads/main:refs/heads/remapped-main
    push = refs/heads/main:refs/heads/skipped ; skipped as it's not the first matching one
    push = refs/heads/feature:refs/heads/remapped-feature ; this is picked up before going to push.default (which would fail)

[branch "main"]
    remote = "origin"
    merge = refs/heads/main

[push]
  default = simple

[branch "feature"]
    remote = "origin"
    merge = refs/heads/main  ; this one is remapped to merge from main, which doesn't affect the push remote.
