Git squash: I'm struggling with this one!

git
atom-editor

#1

Hello the team,

I’m trying to squash down a series of commits on a feature branch using “git rebase -i SHA_OF_PARENT” as per several online tutorials and the docs (https://git-scm.com/docs/git-rebase)

I was expecting to get an atom window with a list of commits to choose from, but instead I get an empty window.

Does anyone have any suggestions as to what I’m doing wrong, please?


#2

May we see the output of “git config --global --list”?


#3

I’ve always used git rebase -i HEAD~n with n being the number of commits to squash. Counting back from the head of the branch.


#4
core.excludesfile=/Users/docljn/.gitignore_global
core.editor=atom
user.name=DocLJN
user.email=ljnoble@gmail.com
color.ui=auto
color.branch.current=yellow reverse
color.branch.local=yellow
color.branch.remote=green
color.diff.meta=yellow bold
color.diff.frag=magenta bold
color.diff.old=red bold
color.diff.new=green bold
color.status.added=yellow
color.status.changed=green
color.status.untracked=cyan

#5

@docljn is the most recent commit one of the series needing to be squashed? If that’s the case see my above comment.


#6

Hi @Robbie. I’ve tried using both the SHA and the HEAD~n formats, and both give me the same empty atom window. Cue total bafflement.


#7

Oh, I know. Change your editor command. git config --global core.editor "atom --wait"


#8

Woot! That worked, thank you so much! I had been googling for ages without success before I posted here…