#1707  How to Reset Branch to Previous Commit
Closed
Maximus opened 4 months ago

This might be a dumb question, but is there a way on the website UI to reset a branch to a previous commit? I've tried branching the commit and merging (it didn't work) and I can't find a button to reset or anything. Am I missing something? Thank you

Robin Shen commented 4 months ago

This can not be performed from UI. You will need to run a forced push from command line

Maximus commented 4 months ago

How then would I delete the files locally? Git pull does not seem to delete them, do I have to manually delete them locally?

Robin Shen commented 4 months ago

You may use below to reset current branch to an old commit:

git reset --hard <some old commit hash>
Robin Shen changed state to 'Closed' 4 months ago
Previous Value Current Value
Open
Closed
Robin Shen commented 4 months ago

Closing as it is a git question instead of a OneDev question.

issue 1 of 1
Type
Question
Priority
Major
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1707
Please wait...
Page is in error, reload to recover