Add push and pull switches
Merge branch 'fix/push-pull' into v5.0