How to replace 'codecrafters submit' commit messages the 'official' way?

warning: not an advanced git user

My goal is to change these generic commit messages in my github repo.

I used git commit –ammend and it seems to work when i checked using git log .But after I used codecrafters submit for the next task, it somehow created another branch and threw a branch conflict error.

I solved that conflict with git pull –rebase but i am again left with these generic commit messages instead of someting like “feat: added autocomplete support in shell via readline”

When the branch conflict happens I notice that the ‘master’ and the ‘origin/master’ heads are attached to two different commits; git pull –rebase fixes that and this is the result, the heads are pointed at the same commit now:

@rmpasswd if we supported codecrafters submit -m "xyz", do you think you’d use it? Or would you only want to update these messages after the fact?

For your current situation, you can use git rebase --interactive <earliest_commit> (tutorial) to reword all the commits you need, and then do a force push (git push -f origin master) to ensure CodeCrafters sees the latest messages. It’ll automatically sync the force-pushed state to your GitHub too.

1 Like