Git hook creation – You are on a branch yet to be born

So im setting up a git and following this guide

I get as far as this command:

  • git merge does not produce conflict on code deletion
  • How to pick a commit in sub-branch and merge it into main branch?
  • How do I configure git to use a folder on another network?
  • Git -i rebase : Unknown command: squash
  • Composer - Forked Laravel 4.2 not installing
  • If I am using a git repository, how can I rewrite mod so it doesn't show subfolder in url?
  • # GIT_WORK_TREE=/home3/trncprop/public_html/tpcapp git checkout -f

    And get the following error message

    fatal: You are on a branch yet to be born

    Does anyone know what I am doing wrong?

    Thanks in advance! Littleswany

  • Tracking changes in Visual Studio
  • Hard Merging in git
  • Why is split option missing in git add -p?
  • git diff returns incorrect
  • Git move n commits forward
  • Is that necessary to install Git server if I want to have remote repository access over ssh?
  • One Solution collect form web for “Git hook creation – You are on a branch yet to be born”

    That command is supposed to be in a hook, not to be executed directly in website.git

    $ cat > hooks/post-receive
    GIT_WORK_TREE=/var/www/ git checkout -f
    $ chmod +x hooks/post-receive

    That means you need to create a website.git/hooks/post-receive file, with that command in it, and make it executable.

    That will allow you to push commits top that bare repo (website.git), which will trigger the post-receive hook, and will checkout the repo content into a different working tree.

    Git Baby is a git and github fan, let's start git clone.