Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 35959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:19:05+00:00 2026-05-10T14:19:05+00:00

With SVN, I had a single big repository I kept on a server, and

  • 0

With SVN, I had a single big repository I kept on a server, and checked-out on a few machines. This was a pretty good backup system, and allowed me easily work on any of the machines. I could checkout a specific project, commit and it updated the ‘master’ project, or I could checkout the entire thing.

Now, I have a bunch of git repositories, for various projects, several of which are on github. I also have the SVN repository I mentioned, imported via the git-svn command..

Basically, I like having all my code (not just projects, but random snippets and scripts, some things like my CV, articles I’ve written, websites I’ve made and so on) in one big repository I can easily clone onto remote machines, or memory-sticks/harddrives as backup.

The problem is, since it’s a private repository, and git doesn’t allow checking out of a specific folder (that I could push to github as a separate project, but have the changes appear in both the master-repo, and the sub-repos)

I could use the git submodule system, but it doesn’t act how I want it too (submodules are pointers to other repositories, and don’t really contain the actual code, so it’s useless for backup)

Currently I have a folder of git-repos (for example, ~/code_projects/proj1/.git/ ~/code_projects/proj2/.git/), and after doing changes to proj1 I do git push github, then I copy the files into ~/Documents/code/python/projects/proj1/ and do a single commit (instead of the numerous ones in the individual repos). Then do git push backupdrive1, git push mymemorystick etc

So, the question: How do your personal code and projects with git repositories, and keep them synced and backed-up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:19:06+00:00Added an answer on May 10, 2026 at 2:19 pm

    I would strongly advise against putting unrelated data in a given Git repository. The overhead of creating new repositories is quite low, and that is a feature that makes it possible to keep different lineages completely separate.

    Fighting that idea means ending up with unnecessarily tangled history, which renders administration more difficult and–more importantly–‘archeology’ tools less useful because of the resulting dilution. Also, as you mentioned, Git assumes that the ‘unit of cloning’ is the repository, and practically has to do so because of its distributed nature.

    One solution is to keep every project/package/etc. as its own bare repository (i.e., without working tree) under a blessed hierarchy, like:

    /repos/a.git /repos/b.git /repos/c.git 

    Once a few conventions have been established, it becomes trivial to apply administrative operations (backup, packing, web publishing) to the complete hierarchy, which serves a role not entirely dissimilar to ‘monolithic’ SVN repositories. Working with these repositories also becomes somewhat similar to SVN workflows, with the addition that one can use local commits and branches:

    svn checkout   --> git clone svn update     --> git pull svn commit     --> git push 

    You can have multiple remotes in each working clone, for the ease of synchronizing between the multiple parties:

    $ cd ~/dev $ git clone /repos/foo.git       # or the one from github, ... $ cd foo $ git remote add github ... $ git remote add memorystick ... 

    You can then fetch/pull from each of the ‘sources’, work and commit locally, and then push (‘backup’) to each of these remotes when you are ready with something like (note how that pushes the same commits and history to each of the remotes!):

    $ for remote in origin github memorystick; do git push $remote; done 

    The easiest way to turn an existing working repository ~/dev/foo into such a bare repository is probably:

    $ cd ~/dev $ git clone --bare foo /repos/foo.git $ mv foo foo.old $ git clone /repos/foo.git 

    which is mostly equivalent to a svn import–but does not throw the existing, ‘local’ history away.

    Note: submodules are a mechanism to include shared related lineages, so I indeed wouldn’t consider them an appropriate tool for the problem you are trying to solve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a checked out SVN project along with some plugins
I have a single SVN repository with the following current structure: project1 branches trunk
A long time ago I had the following directory structure in my SVN repository
I migrated an SVN server today and ran into an issue. I have a
First here's some context on what I want to achieve. I'm writing a small
I am using eclipse / subclipse for development. I also have the TortoiseSVN client.
I'm helping a typical small company that started with a couple of outsourced systems
Ok, I am using Tortoise Subversion in Vista and using VisualSVN on a Windows
I often need to develop stuff on the road, with no internet/network connection. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.