6

I'm thinking on writing some tutorial on de-sloppifying some open-source projects, with I'm likely ending up at least starting some of them.

you are viewing a single comment's thread
view the rest of the comments
[-] 0xDEADBEEFCAFE@programming.dev 7 points 1 day ago

A shorter example:

git clone https://codeberg.org/yourname/yournewrepo
cd yournewrepo
git reset --hard abcdef1 # commit that you want to reset to
git push --force origin

Note that instead of abcdef1 in git reset you can also use the regular expression syntax. So if the commit was named Last release before unwanted changes you would say git reset --hard ':/Last release before unwanted changes'.

this post was submitted on 15 Oct 2026
6 points (68.8% liked)

Git

4800 readers
38 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 3 years ago
MODERATORS