In gitorious, is it possible to move repositories to a different project? - gitorious

We have a bunch of small projects that have a single repository in Gitorious. Most of these repositories are really related. Had the foresight been put into the original creation, these would have all been created under the same project.
Now that there is all of this sprawl, is there any way to keep the repositories (or at least their history) intact, yet group them under a new project?

There is no such move option in gitorious.
The only way I know is to create a new repository inside the target project and then push the code to this repository. Afterwards, you can delete the repository. Note: moving the repository will update the associated URL. This will require coordinating the new URL with any local clones.

Related

Newbie GIT Help - Making a second Repository

I currently work on solutions / projects within a single GIT repository, in Visual Studio. The commits I make are to a local folder on the Visual Studio server, and then I use the command 'git push origin master' (after having changed directory to my local folder / repository) to push commits to a Gitlab in my company's corporate space. The purpose of this is less about using branches and software development (as I am the only person who does any work on this), and more about having a way to rollback changes and keep a master copy off the server.
I now want a fresh copy of this GIT repository, so I can use that as a new baseline for an application migration. I will still continue to work on the existing repository too.
What is the best way to make a copy of the existing repository, that I can treat as a totally separate thing, without accidently messing up my existing config on the server? Should I do the clone from the Gitlab? Or clone locally and then push that up to the new space in my Gitlab? Honestly, I'm a bit confused at this point about the proper model for this stuff.
....................
Sounds like you'd like to fork the project: keep the existing repo and start a new, separate repo based on the old one.
Browse to your project in Gitlab
On the main repo screen, click "fork" in the top right
Select a new/ the same organisation as you'd like
The project is now forked!
From here, you can clone the fork to your local machine in a new folder. These are now separate projects, and code updates can be added, committed and pushed to the separate repos.

Share one file across multiple git repo to be updated by multiple users

I am working on automating the markdown spell check for all the documents on my website which involves multiple git repo. I have a .spelling file that contains all the word to be excluded from the documents. I would like to keep it one file and updated across the entire website. I can get it to work for one repo. I looked into the npm package method. Is there a way to configure package.json to share this file to many repo? Or is there a better way to do it without npm? Thanks!
Make a separate spell-check repository with the .spelling file and script in it, then include it as a submodule in each of your docs repos. You can then reference it from each repository separately, and pull its latest updates into each one.
This could be cumbersome if you have a large number of docs repos, so another alternative is to centralize the spelling check script by making a separate repository for it and adding a configuration file to tell your script which Github repositories to spellcheck. This way, you can selectively apply the spell check process to any number of repositories in your organization.

Create multiple GitHub private repositories from a template

I have to programmatically create repositories on GitHub. Each of them will have the same initial commit. This is for hundreds of them.
I have found a command line tool to create repositories which works fine, but I would then need to clone them, move my template, commit and push. I was wondering if there is already a library for this case or if I would need to create one myself.
Thanks

Remove folder synchronized with tortoise svn

I have synchronized a folder with folder in tortoise svn. Now I want to synchronize this folder with another folder in tortoise svn. How to do this. Please guide me
The mechanism in Subversion are a little bit different. You speak here from a checkout, if you work on a local copy. There are two cases here:
You want to work on a different part of the repository:
Checkout that part at a new location locally (so you are able to work in parallel on both).
Switch your current location to the new part of the repository. This will replace all files locally, and you are no longer able to work on both parts in parallel.
The first scenario is normally used. There are some cases where it may be not appropriate:
You have not enough place locally. You should change that first, because you are not able to work anyway.
You are working on a branch, and want to merge some of the changes on the branch on the trunk or another branch. Then a svn switch is the normal way to do that.
Alternatively, you may do a sparse checkout of the common parent of the two folders, and populate only the parts you are interested in.

Importing a Mercurial repository automatically (e.g. SVN Externals)

I have a project that I am developing built off CodeIgniter. The main part of the project is a private system I am creating, but I want to add it to source control, to gain all the associated goodies. Now I'm using Mercurial, so I did the whole hg init bit, so I've got the repository set up.
Now, one of the things I've done is to make a library for CodeIgniter, which I use in this project. Now I want to make this library open, so I need a separate repo for that.
For anyone unfamiliar with CodeIgniter library development, here's a reference:
application
/config <- configuration files
/libraries <- library logic in here
Now I will probably develop a few more libraries in the course of this project, so I can't just dump a repo in the application folder without clumping them all together.
What I did was this:
dev/ci/library <- library here
dev/project <- project here
Now in both of those folders, I have made a repository. What I want to do is make the project repository automatically reference the library repository, so I can have a private and a public repository, as I explained earlier.
The main way to do this, I have read, is to use subrepositories, but I can only find examples on nested ones (which are unclear anyway, I find). How do I make it reference another repository like svn:externals?
You are correct, subrepos in Mercurial (or submodules in Git) are based on a nested organization.
But in your specific case you need:
two separate repos,
not nested
A way to reconcile both organizations (yours and the nested "subrepo") would be to have three repos
a parent repo (private one, as in can be pushed to a private repo)
the project (private one, as in can be pushed to a private repo)
the library (public one, as in can be pushed to a public repo)
That would give the following:
/dev
.hg (private repo)
.hgsubs (declare the two nested repos 'project' and 'ci/library')
project
.hg (private repo for your project)
config
.hgignore (for ignoring anyhting from libraries)
libraries (private directory, not version)
(symlink to /dev/ci/library)
ci
library
.hg (public repo
That way, you keep:
your two repo separate as you want
a link between the two in order to be able to get back those two repo at the exact reference you left them (i.e. you last pushed each of those repos).
Implemented in Mercurial 1.3, here's the instructions.

Resources