Skip to content

Instantly share code, notes, and snippets.

@xaoc-303
Last active February 26, 2020 14:49
Show Gist options
  • Select an option

  • Save xaoc-303/c1f41812943a65fb14dfb946f3c86d28 to your computer and use it in GitHub Desktop.

Select an option

Save xaoc-303/c1f41812943a65fb14dfb946f3c86d28 to your computer and use it in GitHub Desktop.
# Откатить последний коммит
git reset --soft \#303^
git push -f origin \#303
# Подтянуть ветку наверх мастера
git fetch
git checkout master
git pull
git checkout \#303
git rebase master
git push -f origin \#303
# Удалить все ссылки на remote-ветки, которые были удалены:
git remote prune origin
# Удалить слитые remote-ветки
git branch --remote --merged
# git branch -D -r origin/\#303
git push origin :\#303
# Удалить локальные слитые ветки
git branch --merged | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment