Creating an apt repository on GitHub - github

Can I create an apt repository from my GitHub repository?
I found How To Setup A Debian Repository but it is too complex to understand.

I believe that it would be possible, but it not very practical. Git and GitHub are designed for storing source code, while an apt repository is setup to serve built packages. As far as git would be concerned, even a Debian source package would not be source code. But, since GitHub pages allow serving of largely arbitrary content via http, it should be possible to serve an apt repository in that way.
The page to which you referred doesn't seem at all complex to me, it's just a list of tools which can be used to manage an apt repository. The part listing Archive Generation Tools should be especially helpful. In the past I've used mini-dinstall to manage my own package archive, you'd probably want use either that or reprepro; the other tools are probably either trying to do too much (providing the capability to manage an entire distribution repository) or too little.

Related

How to manage Django Project and its modules with git?

I've been looking for a solution how to manage my project with git for quite some time now. I want to have one instance as the main repo for connecting the entire project. Each app should be its own git instance.
During my search I found both git submodule and git subtree. For both tools I found an instruction how to insert an existing reppo. However, I am interested in how to proceed from the beginning. I mean here from the command $ django-admin startproject myproject Where do I enter the git init? When I create a new app
$ django-admin startapp new-app and how do I use this as subtree/submodule?
Until now I have always found instructions that refer to a remote repo. Is this always necessary? I am not sure if I want to publish every Django app on Github. But I want a version control system just for me. Is this possible?
I have to say that so far it has been enough to manage my "projects" locally. Now I want to work together with others and I don't want to install the whole Django Project locally but only provide me with single functions or modules.
It would be a great help if you could explain to me how that works.
TL;DR
How to manage (start and expand) a Django Project with git. The apps should be their own git repos.
The purpose of submodules is to allow you to graft an existing repo/library into your git. Rarely do you want to do this. Instead you want to use PIP tools to install your libraries as part of library management.
This is essentially a git question. If you don't have a remote repository, you can still use git. With that said, the reason you want a remote repository is so that you can collaborate with others, and have a stored version of the code separate from your workstation.
There are services that let you have private repos even without a paid account. Bitbucket is the most well known of these services and is comparable to Github in most ways.

How to create a repository in github.com using gitpython package

I have tried to create a repository in github with my python program. I found gitpython package in web-search. I can able to pull repository but unable to create a repository in github. please help me.
Git and GitHub are different things.
The former is an open source distributed version control system. The latter is a commercial entity that provides products and services supportng Git. (Confusingly, it is also the name of many of those products.)
There is no way to create a repository on GitHub using the standard git command-line tool.
From GitPython's PyPI page:
GitPython is a python library used to interact with Git repositories.
No mention is made of GitHub, and in general git and GitPython can do basically the same things. If you want to create a repository on GitHub you could use any of the libraries listed here.
Alternatively, you could use their API directly, by POSTing to /user/repos. This method will require you to authenticate, and in my opinion using one of the libraries from the previous list is easier and more robust.

Best practice for using one mercurial project in another

What are the best practices for using one mercurial project in another? I've got a django app that I'm working on, but I'm also using mercurial to version control a website that uses that app. I've looked at mercurial subrepositories, but apparently this is considered a "feature of last resort". Is there a good way of doing what I want to do, or do I just have to copy the code from my app into my website repo when I want to update to a new version of my app?
In your specific case I like to let pip handle my django application dependencies: http://guide.python-distribute.org/pip.html#installing-from-a-vcs
We have in our "website" repo a requirements.txt and our deploy does a pip install --upgrade -r requirements.txt That pulls the latest from the repo and installes it into the application's virtual env. This gives nice flexibility and separation while leaving the package management up to pip. With those VCS urls in pip you can point to a specific tag or branch too if you want different sites using different revisions from the same underlying repo.
pip also has a -e /path/to/file mode for pointing to an "editable" clone that's outside the website repo, which would work too, but I've not tried it.
That said, if you think subrepos fit your workflow better by all means use them. They work just fine, but people often get hung up on the workflow constraints ("What do you mean I can't commit my parent repo w/o also committing in the subrepo?!")

How to setup SVN repository in XCode?

I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode and I see that I can either go down the path of using GIT or SVN.
In the past I have used SVN which is the reason I'm more inclined to go down this path (I'm open to using GIT if people feel it is better than SVN). My question is related to the setup of a repository in Xcode.
I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.
My question is 2-fold:
Please can someone advise on the steps to setup a repository through Xcode?
I notice Xcode requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?
Thanks in advance for any help or advice people can offer.
I think you should go with using GIT. You can create free repository on bitbucket.org
It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.
Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.
If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.
Steps:
Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
Install uberSVN.
Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).
If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.
If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.
There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.
SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see this on how to create a new repository for your existing project.
It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.
See e.g. explanation here https://stackoverflow.com/a/10039004/226086
Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".

What kind of code can I use GitHub for?

What kind of code (what coding languages) can I use GitHub for? Can I use it for websites? Flash? Can I upload images files and other resources?
(I am completely unfamiliar with Git and SVN.)
On git, svn and mercurial:
git, svn, Mercurial are all version control systems. svn was a great improvement over cvs, a commonly used version control system prior to emergence of new VCS. svn like cvs has a client-server model. git and mercurial provides a distributed version control system that does not depend on network as any repository is self contained with all the history and change records. Of course, there are other goodies.
Remember that version control system solves the problem of "the cat ate my code". You can use it to track any kind of development - code, text documents etc.
On github, bitbucket, code.google.com and codplex:
These provide additional goodies on top of what a version control system provides.
They provide you storage for keeping your repository, which you can access and share with the world.
When you share code, you would want to also provide documentation. They provide wiki support for this purpose.
They also provide ticketing / bug management system which can ease a development project.
In short, they provide various tools that can help in project management and development of your code.
Since you are getting to whet the knowledge in some of these areas, following links will be a very useful introductions:
a-visual-guide-to-version-control
intro-to-distributed-version-control-illustrated
You can use GitHub for any source code you want to manage.
But you actually can also use GitHub for your blog(!), the idea being that you would manage your articles and their revisions as you would for a source code base.
(Example: git-blog)
More general documentations: GitHub features (wiki, issue tracking, code review...).
Git does not restrict the kind of files you can track with it... use Github for anything your project needs to track!
Check out http://help.github.com/ for some documentation on how to get started using Git in conjunction with GitHub.
Version control can be applied to ANY file type. From text to images to Flash to whatever. Subversion is my Version control system of choice, and I host my own Subversion server.
As for Git. Well Git is just another version control system. Again, the same rules apply, you can version any file-type. Git-Hub is a public Git server that you can register for and use. You can make your repository public or private.
You cannot however host a site on git-hub. You can do rudimentary blogs, and use the git-feeds to feed your site, but you can't really use it as a traditional web site.