Going back to a old commit to fix something

Hi everybody.

I’m realy exited to use git and github, but some days ago I had a funy experience that I’d like to share with you, may you can told me what happend because I’m starting with this control versions world hehe.

I was working in a proyect were I have two branches master and dev, I ussualy work on dev so I was codding something when I realice that something went wrong with a log library that I found so I decided to comment the library code, to do commit and go forward then I decide went back to fix that issue and I did a checkout to that old commit I fixed the issue and I created a new branch so in that point I had three branches; master, dev and devlogissue so I tried to merge devlogissue into dev branch but olny some parts on my code was replaced/overwritten, it looked like some lines were differents in devlogsissue but even that that these lines were not overwritten on dev branched. The temporaly solution was to create a new branch from dev (devtmp) then I copied all code from devlogissue and finaly I merged devtmp into dev and everithing works as I was waiting for. So the question is: what happend when I tried to merge devlogsissue into dev?

Note: all time I work in only one same file.