Git-1.7.11-preview20120710.exe used by me. I create a git repository
cd "GIT scm/"
git init --bare shahed.git
cd shahed.git
git update-server-info
Then I start git daemon by following command
git daemon --reuseaddr --base-path="E:/GIT scm/" --export-all --verbose --enable=receive-pack
Then I clone the git repository as following
git clone git://localhost/shahed.git
Cloning into 'shahed'...
warning: You appear to have cloned an empty repository.
cd shahed
touch shahed.txt
touch shohel.txt
git add *.*
git commit -m 'ok'
[master (root-commit) 2062f1d] 'ok'
0 files changed
create mode 100644 shahed.txt
create mode 100644 shohel.txt
git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date
While git daemon console log following message
[4044] Ready to rumble
[736] Connection from [::1]:50076
[736] Extended attributes (16 bytes) exist <host=localhost>
[736] Request upload-pack for '/shahed.git'
[4044] [736] Disconnected
[4860] Connection from [::1]:50079
[4860] Extended attributes (16 bytes) exist <host=localhost>
[4860] Request receive-pack for '/shahed.git'
[4860] fatal: The remote end hung up unexpectedly
But I am unable to git push. anybody tell me which step i missed to creating git repository. all the initiative are taken by me are ok or where is the lackings for configuring git repository.
What that is telling you is that there is no
masterbranch in your bareoriginrepository, because it was created empty. So, it can’t find the branch you want to update, and by default it won’t blindly create a new branch (in case it was a typo or something). You may need to usegit push -f origin masterthe first time. Once there is amasterbranch inorigin, normalgit pushshould work fine.Alternatively, you could create your working repository first, with at least one commit in it, then
git clone --bareit into yourgit-daemonlocation, but you’ll then want to remove theoriginremote specification in your bare repository, and you’ll have to manually add it (or re-clone) in your working repository.