Skip to content

Rodrigo Gonçalves

IT Analyst and Consultant

  • Contact
  • Academic Curriculum
  • Research
  • Personal Projects
  • LinkedIn
  • E-mail
  • Containers (1)
  • Operating Systems (4)
  • Programming (3)
  • Research (6)

How to make an older commit the latest

How to make a certain commit the latest in a repository (deleting all following commits):

 

git reset –hard CommitId

git push -f origin master

 

 

(from https://stackoverflow.com/questions/40245767/delete-commit-on-gitlab )

Posted on November 22, 2018December 30, 2023Author adminCategories GIT, Programming

Post navigation

Previous Previous post: GIT list status on all directories
Next Next post: Reducing WSL-2 Memory Usage