Daftar Isi:

  1. ambil code commitannya contoh 55f8bc8e28c61c4b59807516daabc5fb5ee04a96
kesapp17@kesapp17-Thin-15-B13UCX:~/Documents/epuskesmas$ git log
commit 55f8bc8e28c61c4b59807516daabc5fb5ee04a96 (HEAD -> EPC-348/notifikasi-pkg)
Author: arip.budiman <arip.budiman@infokes.co.id>
Date:   Fri Feb 7 14:23:30 2025 +0700

    fixing
  1. lalu jalankan perintah berikut
git rebase -i 55f8bc8e28c61c4b59807516daabc5fb5ee04a96
  1. setelah itu akan muncul di nano, ubah pick menjadi edit
  GNU nano 6.2                                                           /home/kesapp17/Documents/epuskesmas/.git/rebase-merge/git-rebase-todo                                                                     
edit ce43386a0 fixing feedback
pick d2264ca11 fixing bug
pick 88ac04c8a fixing

# Rebase 13de22c61..88ac04c8a onto 13de22c61 (3 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
#                    commit's log message, unless -C is used, in which case
#                    keep only this commit's message; -c is same as -C but
#                    opens the editor
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified); use -c <commit> to reword the commit message
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#

lalu jalankan ctrl+o dan ctrl+x

  1. lalu masukan perintah berikut dan sesuaikan username dan email baru anda
git commit --amend --author="username_baru <email_baru>"
  1. lalu jalankan
git rebase --continue
  1. lalu push ulang
git push origin -f nama_branch