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

how change master to older commit without deleting current commit #20

Open
hamidasgarian opened this issue Jul 12, 2017 · 0 comments
Open

Comments

@hamidasgarian
Copy link

i have this commits in my local and remote repository
A B C
and master points to c
i want to change master to B (or A) in my local and remote

after tried this commands:
git reset --hard
git push -f origin master

that commands change master to B but also delete c commit so i can't checkout to c in future. how can i do that without deleting any commit or history?
just change master's pointer to older commit id in local and remote
A B C
|
master
A B C
|
master

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

No branches or pull requests

1 participant