简体   繁体   中英

git remote different remotes for fetch and push

when I do git remote -v I get

origin  git@xxx.yyy.cc:name fetch)
origin  git@xxx.yyy.cc:name (push)

Why there are two separate entries for fetch and push remotes? What would be the case where someone would want a different remotes for these two actions?

As this helpful blog discusses, one case where you would want separate remotes for fetching and pushing is if you forked someone else's repository. In this case, you would want to pull from the main repository and then push to yours.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM