Reputation: 1016
Dear all I'm trying to upload my code to a git repository at sourceforge.net. I used Xcode 4's version editor to make a local git repository to manage my code. Now, I want to release my code to the remote repository.
I'm trying to clone it. When I try to use the clone command in Xcode 4. It seems to me its only for cloning into local drive.
I tried from the command line. its says that I'm trying to clone a empty repository.
Can anyone help?
Upvotes: 0
Views: 1765
Reputation: 2080
In order to upload your code from an Xcode project into sourceforge, you want to push the content, not clone the empty repository from sourceforge. Remember that you should be adding and committing all your files to your local git repository before trying to push content to sourceforge. On the command line, use git add *
and git commit -m 'My commit message
to get them all added and checked in (or the equivalent commands in Xcode 4).
This is taken from http://sourceforge.net/apps/trac/sourceforge/wiki/Git:
How to push a local repository
If you did not clone one of our remote repositories (for instance, if your older git version won't let you clone an empty repository), you will have to take some manual setup steps to be able to push your content to our servers.
For any local Git repository, you can configure it to push data back to our server by doing the following from inside your Git repository (this replicates what a "git clone" from our servers sets up for you automatically):
git remote add origin \
ssh://[email protected]/gitroot/PROJECTNAME/REPONAME
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
Now you're ready to push the committed files to our servers:
git push origin master
Note: The use of "origin master" prevents Git from complaining that the remote server has no branches in common with your local repository (which is true at the start when the remote repository is completely empty), and "master" is the default branch in Git.
After the first push, you will be able to use the simpler "git push" to push the master branch to our "origin" server.
Once that is done, you will be able to browse your newly-committed content via gitweb, clone the repository via either read-only or read/write access methods, push more check-ins, etc.
Upvotes: 2