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

code-school-git-real & git reset #6

Open
xgqfrms opened this issue Jan 9, 2023 · 3 comments
Open

code-school-git-real & git reset #6

xgqfrms opened this issue Jan 9, 2023 · 3 comments
Labels
git reset git reset HEAD^^ & HEAD~2 HEAD^^ & HEAD~2

Comments

@xgqfrms
Copy link
Owner

xgqfrms commented Jan 9, 2023

code-school-git-real

pdf

https://github.com/xgqfrms/git

https://git.xgqfrms.xyz/git-add/git_real_slides.pdf

git reset

# 软重置 commit
$ git reset --soft HEAD^

# 硬重置 commit
$ git reset --hard HEAD^

# HEAD^^ === HEAD~2
$ git reset --hard HEAD^^
# 等价于 
$ git reset --hard HEAD~2

image

@xgqfrms xgqfrms added git reset git reset HEAD^^ & HEAD~2 HEAD^^ & HEAD~2 labels Jan 9, 2023
@xgqfrms xgqfrms changed the title code-school-git-real code-school-git-real & git reset Jan 9, 2023
@xgqfrms
Copy link
Owner Author

xgqfrms commented Jan 9, 2023

demos

image

image

@xgqfrms
Copy link
Owner Author

xgqfrms commented Jan 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git reset git reset HEAD^^ & HEAD~2 HEAD^^ & HEAD~2
Projects
None yet
Development

No branches or pull requests

1 participant