This guide is to get you familiar with how to handle git on the dsource.org server. If you want to do something not explained here, you can go to http://www.kernel.org/pub/software/scm/git/docs/user-manual.html and read up.
Get the source
To get the source from the server to a local directory, run:
git clone http://git.dsource.org/projects/<your_project>/ <src_folder>
<src_folder> will then be created and filled with the source from dsource.
If you have been given a new git server where you want to put some already existing source, then run:
in your local folder with the source you want add to the repository. Then go to the section about pushing.
To pull new updates run:
this will apply all new updates on the server to your local repository.
Once you have some changes in your code, we can push it to the server.
If it's a new file, you have to do a
git add <file>
first. And, to remove, do
git rm <file>
git commit -a
to commit the changes you have made. This will open a texteditor where you can write a commit note. Note that this have to be in the top of the file. If you don't write any, it will abort the commit.
Now, all that's left to do is to run
git push http://<username>:<password>@git.dsource.org/projects/<your_project>/
and it will push all commits you have.
Note that you can run the command
git-config remote.dsource.url http://<username>:<password>@git.dsource.org/projects/<your_projects>/
and then just type
git push dsource
when you want to push your commits.
- When i push it just hangs forever?
This is because you have forgotten to add a '/' at the end of the url your are pushing to.
Anders Johnsen aka skabet