# Checkoutgit checkout --orphan latest_branch
# Add all the filesgit add -A
# Commit the changesgit commit -am "commit message"# Delete the branchgit branch -D master
# Rename the current branch to mastergit branch -m master
# Finally, force update your repositorygit push -f origin master
Tag
批量删除
# 批量删除本地taggit tag |xargs -I {}git tag -d {}# 批量删除远程taggit show-ref --tag |grep -E 'release-test.+'|awk'{print $2}'|xargsgit push origin --delete
同步tag到本地
# 删除所有本地taggit tag -l |xargsgit tag -d
# 从远程拉取所有信息git fetch origin --prune