1. Home
  2. Articles
  3. 👨🏻‍💻 Error ketika git push

👨🏻‍💻 Error ketika git push

Your branch and 'origin/main' have diverged, and have 1 and 2 different commits each, respectively.

Ketika git push muncul pesan error seperti ini

Your branch and 'origin/main' have diverged, and have 1 and 2 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

Error ini muncul setelah saya buat file di github langsung, dan ada commit di local code.

Jika tidak ada conflict maka bisa gunakan kode ini:

$ git push -f -u origin <name of branch>
🌐 ryanuiux.com