I was previously using GIT with unfuddle, however I’m looking at trying Gitflow with Github as the central repository. So far I have done the following so far:
- Create Github account and create repository within Github I.e website
cd /home/username/Downloads/(on local machine)wget -q –
http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh
–no-check-certificatesudo chmod a+x gitflow-installer.shsudo chmod a+x gitflow-installer.shcd /var/www/website/(where the website files are)git flow initgit remote add origin git@github.com:username/website.gitgit add *git commit -am “initial commit”
All files are now committed ready to push to the central repository.
Create SSH key using this tutorial – https://help.github.com/articles/generating-ssh-keys
Now, I’m trying to push the files to the central respository, however although the files have been pushed I got the following errors:
error: unable to create directory for .git/refs/remotes/origin/develop
error: Cannot lock the ref ‘refs/remotes/origin/develop’.
Any idea why? Is this the correct setup so far?
“unable to create directory for .git/refs/remotes/origin/develop” means there is a permission issue to write the remote reference in your local repo initialized in
/var/www/website/.In this question for instance, the OP had to do a
sudo git push.sudoorchownare mentioned in “Problems with first upload to github“.On the remote side, as mentioned in “uploading a repository to github fails says “permission denied”“, make sure to add your public ssh key to your GitHub repo.