Git Push to Wrong Branch / Undo Push

Jika kita tidak sengaja mem-push ke branch yang salah, misalnya dari feature jadi push ke branch master, berikut cara men-solve nya

1. checkout ke branch master

2. reset commit menggunakan source tree. Branch master di-reset ke commit terakhir yang stabil

untitled

3. push branch menggunakan git bash

git push origin master -f

This entry was posted in   GIT.
Bookmark the   permalink.

Chandra Oemaryadi has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>