当前位置:网站首页>Pull all data of a branch of the code cloud to cover the local code

Pull all data of a branch of the code cloud to cover the local code

2022-06-22 05:07:00 m0_ fifty-one million seven hundred and three thousand and eigh

turn

When developing , Due to improper operation , You need to pull the code back from the remote specific branch , Override local fixed branch . The specific code is as follows :

git fetch --all
git reset --hard origin/ Branch name ( such as :git reset --hard origin/master)
git pull // It can be omitted

git fetch The instruction is to download the latest content of the remote warehouse , Do not merge
git reset Give orders to HEAD Point to master The latest version

原网站

版权声明
本文为[m0_ fifty-one million seven hundred and three thousand and eigh]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220504274804.html