git - how to move 1 commit forward -


i created file example.txt , committed it. after removed file git rm example.txt. , committed changes used git checkout head^ in understanding. moving me previous commit. file , when use git status following:

# not on branch. nothing commit (working directory clean) 

so have 2 questions: 1. why right not on branch? 2. how can return 1 commit forward( removed file , committed changes). many help

why right not on branch?

since checked out specific commit, in detached state now.

how can return 1 commit forward( removed file , committed changes).

in particular case should simple git checkout head


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -