git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
git push --all origin -f
# 1、删除本地分支
git branch -D <branch>
# 2、删除远程分支
git push origin --delete <branch>
git branch -m master
# 1.Checkout
git checkout --orphan latest_branch
# 2. Add all the files
git add -A
# 3. Commit the changes
git commit -am "commit message"
# 4. Delete the branch
git branch -D master
# 5.Rename the current branch to master
git branch -m master
# 6.Finally, force update your repository
git push -f origin master
如果这篇文章对你有所帮助,可以通过下边的“打赏”功能进行小额的打赏。
本网站部分内容来源于互联网,如有侵犯版权请来信告知,我们将立即处理。