You are not logged in.
Does anyone know what commands would work using git in reversing all commits to a specific one?
Like say there are 100 after commit ab30493
what command(s) would I use to remove every changed commit after ab30493.
That's just an example,
Ie, so it would be like it was before the 100 commits.
Can anyone answer me?
Feel free, I will wait nearby hopefully.
Or tomorrow maybe, etc...
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
git reset ab30493
That will reset the checked out tree to the files of that commit, and mark that as HEAD for this workspace. The future history of the project following that commit will remain.
Offline
Running git reset revision will change where HEAD is pointed, and - depending on various factors - may or not result in losing history, and may affect the ability to interact with remotes.
Alternatively, git checkout -b branch revision will create a new local branch at that point, allowing one to make changes but not lose history, and retaining the ability to push/pull as normal.
There are a bunch of other potential options depending on precisely what the situation is and what the desired outcome is.
3.1415P265E589T932E846R64338
Offline
I actually looked this up at one point, before I saw you replied here and the solution was git reset revision --hard
That seems to be what I wanted most of all.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline