Git Guide
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:
git init
in your local folder with the source you want add to the repository. Then go to the section about pushing.
Pull updates
To pull new updates run:
git pull
this will apply all new updates on the server to your local repository.
Push changes
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>
Now, run
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.
Troubleshooting
- 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