Git push and fetch use different warehouses

I fork a code from the main warehouse to my origin/master, before I need to get updates from central/master to confirm that there is no conflict before submitting each modification, and then apply for a merge.
because IDEA is very good at integrating git, it is a bit troublesome to manually select the main warehouse for each update, so I want to configure the update operation of Idea from the default push of the Central/master, submission operation to my own origin/master,. I tried to first set the Upstream of branch as the primary warehouse, and then separately set the upstream of Push to origin,. After setting the update operation to origin, I found that the warehouse of the update operation was also covered by origin. Do you guys have a good way to solve this problem.

Mar.16,2021

I think we can use the git hook mechanism to push to origin/master, and then cherry pick to Central/master. Then write these steps into a shell script, which is simple and clear

.
Menu