Based on the following git scenario:
C0 (master)
\
\
C1-------------C5 (develop)
\ /
\ /
C2--C3--C4 (feature)
I have a new uncommitted file that I want to add into master as part of commit C0. So what I did is to checkout master and then amend in order to add the file into C0.
Everything looks find but the problem I'm experiencing is that C0 hash changed and caused C1 to lose the reference.
C0 (master)
C1-------------C5 (develop)
\ /
\ /
C2--C3--C4 (feature)
I'm basically new to git and I'm sure I did something wrong. I would appreciate any help on how to "link" C0 and C1 again.
Probably the best practice, should have been to create a new commit (C6) in master and then merge in develop, but I want to know if there is a way to solve this type of issues for future cases where, maybe "amending" into current commit is the best option.