How to?

Pull remote main without checkout

Jul 8, 2025
softwares-and-toolsgitpull
1 Minutes
32 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

强制更新本地 main 分支,使其与远程 main 分支保持一致 (移动语法, -f = force)

1
git branch -f main origin/main
Article title:Pull remote main without checkout
Article author:Julyfun
Release time:Jul 8, 2025
Copyright 2026
Sitemap