Skip to content

Instantly share code, notes, and snippets.

@vorozhba
Last active June 24, 2024 07:39
Show Gist options
  • Save vorozhba/b458077f396191a6105cf91e1739a313 to your computer and use it in GitHub Desktop.
Save vorozhba/b458077f396191a6105cf91e1739a313 to your computer and use it in GitHub Desktop.
Как удалить commit в Github
1. Получаем хэш-код коммита, к которому хотим вернуться.
2. Заходим в папку репозитория и пишем в консоль:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force
@SubwaySerfer
Copy link

Спасибо)

@temka778
Copy link

Спасибо! Во всем интернете почему-то никто не написал про форс.. Благодаря Вам , у меня все получилось!)

@VitaliyProgrammer
Copy link

be careful with: git reset --hard a3775a5485af0af20375cedf46112db5f813322a it delete all your current changes, use that command without --hard, then `git push --force

Thank`s..

@yarosoff
Copy link

be careful with: git reset --hard a3775a5485af0af20375cedf46112db5f813322a it delete all your current changes, use that command without --hard, then git push --force

Thank u!

@iavoxir
Copy link

iavoxir commented Mar 12, 2024

Спасибо)

@aQafresca
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment