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

Git reset command #50

Open
Wenfengcheng opened this issue Oct 12, 2019 · 0 comments
Open

Git reset command #50

Wenfengcheng opened this issue Oct 12, 2019 · 0 comments

Comments

@Wenfengcheng
Copy link
Owner

查看 commit日志

$ git log

回退命令:

$ git reset --hard HEAD^         回退到上个版本
$ git reset --hard HEAD~3        回退到前3次提交之前,以此类推,回退到n次提交之前
$ git reset --hard commit_id     退到/进到 指定commit的sha码

强推到远程:

$ git push origin HEAD --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant