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

  • Home
  • SEARCH
  • 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 8368073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:18:11+00:00 2026-06-09T13:18:11+00:00

I convert a CVS repository to a Git repository with the following command: $

  • 0

I convert a CVS repository to a Git repository with the following command:

$ git cvsimport -vaikd :pserver:thillaiselvan@192.168.1.11:2401/ -C IVR-GUI GIT

However, Git ignores the empty directories in the CVS repository. But I want the repository to be cloned including those empty repositories. How can I make Git to do that?

  • 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. Editorial Team
    Editorial Team
    2026-06-09T13:18:13+00:00Added an answer on June 9, 2026 at 1:18 pm

    Git cannot track empty directories, so they’re not brought over in the CVS-Git conversion. From the Git FAQ: “Directories are added automatically when adding files inside them.” Your directories don’t appear because Git isn’t tracking anything within them.

    How to track empty repositories in Git

    One workaround to track empty directories is to place an empty file, like .gitkeep in each empty directory (.gitkeep is used by convention, but you can name this file anything you want). Track the files, then you’ll be able to clone empty directories. There are a few other ways to add empty directories to a Git repository.

    Manually copy empty files from a pre-existing CVS repository

    The following command will copy all empty directories in your cvs repo to your Git repository (substitute the dummy directory paths)

    $ find ~/cvs_repo -type d -empty -exec cp -r {} ~/git_repo/ \;
    

    You can then add these empty directories to your project with your workaround of choice, and follow up with something like $git commit -m "Add empty directories to repository".

    Automating the procedure with cvsimport?

    Now, I would assume that cvsimport would compensate for this difference in VCS (CVS lets you track empty directories, Git does not). I don’t know anything about the tool, but maybe there’s an option you can pass to have it automatically handle adding empty directories.

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

Sidebar

Related Questions

How to convert a CVS repository to a git repository? I have tried using
I converted an old cvs repository into mercurial via hg convert . Everything seemed
I have a large CVS repository containing files in ISO-8859-1 and want to convert
I’m trying to convert an existing Windows CVS repository to Mercurial and getting the
Are there any tools/techniques to convert (downgrade) an existing SVN repository to (old-fashioned) CVS?
we needed to convert CVS to GIT yesterday. Everything went fine except that I
I have a Git repository (originally CVS, then SVN, now Git) containing a Rails
I have been trying to use HG convert to migrate a local CVS repository
I have a rather large CVS repository that I am looking to only convert
Our current CVS repository has 42Gb of space. Truthfully, we'll probably not convert a

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.