1

I initialized a bare repository on server

git init --bare  

and then added a remote

git remote add origin my.hosting.website.com:my-repository.git   

then I am trying to pull.I used

pull -all my repo on server

Problem is when I try to pull/push an item it gives error message

fatal: /usr/libexec/git-core/git-pull cannot be used without a working tree

How to resolve this issue ?

Sorry I am just new to git.

Adi
  • 43
  • 10
  • By the way Is it appropiate to use this guide as it contains checkout command , which can be dangerous to use . – Adi Aug 14 '15 at 09:32
  • http://toroid.org/ams/git-website-howto – Adi Aug 14 '15 at 09:33
  • Checkout can be dangerous, but it's also the command to switch branches - a safe, common, necessary function. You might want to do some more reading if you're worried, until you understand the commands better. – pete the pagan-gerbil Aug 14 '15 at 09:34
  • I am a beginner git user who uses git to maintain version control between his machine and his repo , usually I I have rarely used checkout commands. Usually I use add ,commit , push and pull commands. – Adi Aug 14 '15 at 09:38
  • There are other developers who use the hosting web server , is using git variable like GIT_WORKING_TREE and then using hook as mentioned in the link is the only way to connect to server ? – Adi Aug 14 '15 at 09:45

0 Answers0