Q:

merge changes on detached branch after git checkout 

I was originally working on git branch named "feature". Then ，I commited my changes . 
Then I noticed there are some new created files shouldn't be in my commit. So I found the lastest commit hash 1b33aa (I use git log command).
After that, I did:
git checkout 1b63aa

Then I made more changes (I though I was still on feature branch...my mistake), and commited again.
Then I run git branch ,it prints out :
* (detached from 1b33aa)
  feature

How can I merge back those changes I just made to feature branch now?

A:

You are on a detached branch now. It seems you want to replace your feature branch with this one. A safe way to do that is to rename feature to something else and then turn the current branch into a proper branch named feature:
git branch -m feature feature-bak
git checkout -b feature

In your first step, I think you wanted to do a git reset instead of a git checkout:
git reset 1b63aa

On the other hand, if you don't want to replace the feature branch but merge the changes in the current branch to feature, you can do like this:
git checkout -b temp
git checkout feature
git merge temp

