How to understand git remote message? -


i have create new local repository (using git init, followed adding , committing files). later added remote repository:

$git remote add br /home/user/work/git/bare/

i can see through command git remote -v git fetch br successful

when switch repo, gives following message:

$ git checkout br/master

note: checking out 'br/master'.  in 'detached head' state. can around, make experimental changes , commit them, , can discard commits make in state without impacting branches performing checkout.  if want create new branch retain commits create, may (now or later) using -b checkout command again. example:    git checkout -b new_branch_name  head @ a155c68... added makefile.in` 

i did not understand above text? 'detached head' state?

just add:

$ git branch  * (no branch)    master  $ 

i @ no branch, how/why?

you checked out commit pointed remote branch (you can list them using git branch -r). if it’s not pointed local branch, results in detached head. should set br/master upstream of local master.

git checkout master git branch -u br/master 

you can synchronize local , remote master branch using git push , git pull.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -