Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用--orphan创建崭新的分支 #25

Open
hardfist opened this issue Jun 28, 2019 · 0 comments
Open

使用--orphan创建崭新的分支 #25

hardfist opened this issue Jun 28, 2019 · 0 comments
Labels

Comments

@hardfist
Copy link
Owner

有时我们想要删除某个仓库的所有历史提交记录,这是就可以使用orphan命令

git checkout --orphan newborn master

这时候的newborn分支就是一个崭新的分支,拥有master的所有文件,但是没有任何记录,我们把这个branch提交到远端覆盖远端即可

@hardfist hardfist changed the title 使用orphan创建崭新的分支 使用--orphan创建崭新的分支 Jun 28, 2019
@hardfist hardfist added the git label Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant