[keycloak-dev] got detached from git branch? How?

Marek Posolda mposolda at redhat.com
Thu Mar 24 16:51:54 EDT 2016


The fact you are detached is not anything bad. You can at any time check 
your commit history with command:

git log --pretty=oneline --graph

If history looks good and commits looks as you expected, you can at any 
time drop your local "master" branch and promote your current branch to 
the new local "master" branch. Just do 2 commands like:
git branch -D master
git checkout -b master
git status

Last command should show that you're again "atached" to master branch. 
Note this needs to be done carefully as you drop your previous local 
"master" branch and all commits in it.

Marek


On 24/03/16 20:47, Bill Burke wrote:
> Ok,
>
> I've been struggling with GIT today.  For some reason, my 1.9.x branch
> clone and my master clone got detached.  I'm assuming it is because of
> the rebasing I did as this has never happened to me before...
>
> So on that note...screw this rebasing shit.  I'm sick of wasting time
> re-applying commits every time I screw things up.   I'm just too stupid
> and incompetent to use this feature of git.
>



More information about the keycloak-dev mailing list