How to Reset Branch to Previous Commit (OD-1707)
Maximus opened 2 years 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 2 years ago

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

  • Maximus commented 2 years 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 2 years 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' 2 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 2 years ago

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

issue 1/1
Type
Question
Priority
Major
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-1707
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover