I am a bit of a noob with Git and was tasked to clean up the history of a feature I developed recently. I have a similar setup to this fellow here. I also kind of want to accomplish the same thing, but I want to squash to specific commits. For example, if my commits are commit1, commit2, ..., commitN, I want to make it so that commit1, commit2, ... are squashed to commitX; commitX+1, commitX+2, ... are squashed to commitY; etc.
I understand that this is possible with the command
git rebase -i origin/*branch_name*
but the problem is that when I run that command, I get this:
noop
# Rebase a112005..a112005 onto a112005 (1 command(s))
...
As far as I understand, the last and the first commits should be displayed here, but it only sees the last commit. When I try to run pick or squash with any other commit it says:
error: could not apply *commit hash*... *commit message*
which obviously means that it finds the commit since it knows its message, but for some reason, it doesn't even see it as editable. Anybody have any idea how I can fix this? Also if someone recommends either a better terminal-based synchronization system for my setup or a better way of organizing my stuff, I'd be grateful.