Larissa O.’s Post

Have you ever finished a project and realized the code is correct… but the Git history isn’t? 🤔 Recently, while working on a technical assessment, I faced exactly that. The project was working perfectly, but an important interface hadn’t been included in the correct commit. If I had added it at the end, the commit history would become confusing and lose its meaning. So I took a more careful approach and fixed the history using interactive rebase. 👉 What I did in practice: Used git rebase -i to go back to the commit where the interface should be Marked the commit with edit Added the file and used git commit --amend Continued the process with git rebase --continue Result: ✔️ Organized commits ✔️ Semantic history ✔️ Code and context aligned 💡 Takeaway: Git is not just about versioning code, but about telling the story of your development clearly. ⚠️ One important note: Rewriting history with rebase should be used carefully. In shared branches or team environments, this can cause conflicts and impact other developers. In those cases, it's usually better to avoid it or align with the team first. Small details like this can make a big difference. #Git #SoftwareDevelopment #Learning #Programming #Github #Backend #Frontend #Fullstack

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories