Simply, I've done like this :
A------B-------C
\
\
B2
Now, I want to change B to B2.
A------B2-------C
Is it possible?
SOLUTION HISTORY:
I just added my work history.
$ git log
commit b671c70b C
commit f4acdc2b B
commit 56f38939 A
$ git checkout f4acdc2b
and I modified something... then committed with -amend option.
$ git commit -amend
$ git log
commit e2fd729 B'
commit 56f3893 A
Now, It became like this:
A------B-------C
\
\
B'
To rebasing B to B'
$ git checkout b671c70b
$ git rebase -i 56f38939
which opens the interactive editor
pick f4acdc2b B
pick 56f38939 A
just remove line pick f4acdc2b
, save and quit.
If there is error error: could not apply b671c70b... C
,
edit all merge conflicts and then,
$ git add .
$ git rebase --continue
$ git log
commit 914c6bc C'
commit 56f3893 A
$ git checkout 914c6bc
$ git rebase e2fd729
$ git log
commit 5c65190 C''
commit e2fd729 B'
commit 56f3893 A
Now, It looks like this.
A------B'-------C''