I'm working with a local repo and there are no upstream repos. I had a single branch 'master' in which HEAD referred to the most recent commit. In an attempt to accomplish something* I did a:
git rebase -i master
which brought up the editor window so I could do my picks and squashes. Uncertain of what to do next, I closed the editor (no changes were made) and was told by git:
Successfully rebased and updated refs/heads/master.
That was the sum total of git's response.
I have two questions here:
First, did anything actually change in my branch and what condition is my branch in now? (I realize that's two questions in 1.)
Second, if there was an impact from this command, how do I undo?
First, did anything actually change in my branch...
If the editor said "noop", then there wouldn't have been any changes, as there were no SHAs to process.
If the editor did have any SHAs in it, you run the risk of having changed history. The likely thing that would be impacted would be merge commits.
...and what condition is my branch in now?
Use git status
to inspect that. If it informs you that your branch and your remote branch have diverged, you've rewritten history. Otherwise, I wouldn't sweat it.
[I]f there was an impact from this command, how do I undo?
Provided that you have not force-pushed this branch, you can reset the state of your local branch to match that of the remote branch.
git fetch
git reset --hard origin/master
If you have force-pushed, then you should ask that someone who pulled a copy of the repository (and hasn't dealt with the rebasing of master yet) to force-push their master branch.