Yesterday, I posted a question on how to clone a Git repository from one of my machines to another, How can I \'git clone\' from another machine?.
I am now
You will need to change the config file on the remote server once you have created empty(bare) repository, say
root@development:/home/git/repository/my-project# cat config
there you will see
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
You will make this bare to false to true and I removed logallrefupdates = true (not sure of its use!)
to
[core]
repositoryformatversion = 0
filemode = true
bare = true
You may test following
$ git remote show origin
* remote origin
Fetch URL: my-portal@development:/home/XYZ/repository/XYZ
Push URL: my-portal@development:/home/XYZ/repository/XYZ
HEAD branch: (unknown)
This HEAD branch: (unknown) will be shown if you are unable to PUSH. So if the HEAD branch is unknow, you should change bare to true and after push successful you can reuse the
git remote show origin
and you will see
HEAD branch: master