Remove the secret Remove a blocked secret to allow the commit to be pushed to GitLab. The method of removing the secret depends on how recently it was committed. The instructions below use the Git CLI client, but you can achieve the same result by using another Git client.
git add < file-name >.git commit --amend.git push.git log.git switch --create copy-branch so you can reset to the original branch if the rebase encounters issues.git rebase -i <commit-sha>~1 to start an interactive rebase.git add < file-name >.git commit --amend.git push --force --set-upstream origin copy-branch:<original-branch>.git branch --delete --force <original-branch>.git branch --move copy-branch <original-branch>.