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 938129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:35:30+00:00 2026-05-15T21:35:30+00:00

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git

  • 0

I added some Haml templates to my Rails 3 project with

git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml

only to find, when I tried to edit some of those files, that this was a submodule, so I couldn’t commit changes that I made within the lib/generators/haml directory. Now every time I git status, I get

# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   lib/generators/haml
#
no changes added to commit (use "git add" and/or "git commit -a")

but git add lib/generators/haml has no effect. I really just want to have the files, not a submodule, but I’m finding the submodule impossible to get rid of:

> git rm --cached lib/generators/haml
rm 'lib/generators/haml'
> git status

# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   deleted:    lib/generators/haml
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   lib/generators/

> git commit -m "Removed submodule"

[master 02ae4c7] Removed submodule
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 160000 lib/generators/haml

> git status

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   lib/generators/
nothing added to commit but untracked files present (use "git add" to track)

> git add lib/generators/haml
> git status

# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   new file:   lib/generators/haml
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   lib/generators/haml

> git commit -m "Re-added lib/generators/haml"

[master c966912] Re-added lib/generators/haml
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 160000 lib/generators/haml

> git status

# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   lib/generators/haml

Additional git adds are useless. If I try git rm -rf lib/generators/haml, I get

fatal: git rm: 'lib/generators/haml': Operation not permitted

It just won’t die! I’ve looked up how to delete submodules, but in this case, there is no .submodules file, nor is there any mention of the submodule in .git/config. Yet if I run git submodule update, I get

No submodule mapping found in .gitmodules for path 'lib/generators/haml'

I deleted the directory, but I get the same results! What’s going on? Do I need to create a .gitmodules file just to delete the submodule?

  • 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-05-15T21:35:31+00:00Added an answer on May 15, 2026 at 9:35 pm

    If there is no submodule, is it possible it (i.e. ‘haml‘) is actually not a submodule?

    git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml
    

    means: create lib/generators/haml directory, and checkout in it the master branch of git://github.com/psynix/rails3_haml_scaffold_generator.git.

    The fact that you can do a git status not from the root of your new repo ( lib/generators/haml), but three levels above (where lib is) means you have clone a repo within a repo.

    Both repo can work independently, but you should add lib/generators/haml to the .gitignore of the parent repo (like in hits SO question).

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

Sidebar

Ask A Question

Stats

  • Questions 470k
  • Answers 470k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should simply deploy System.Web.Mvc.dll along with your project. You… May 16, 2026 at 2:55 am
  • Editorial Team
    Editorial Team added an answer If you are getting the directions via the Javascript directions… May 16, 2026 at 2:55 am
  • Editorial Team
    Editorial Team added an answer If you look at a site such as browserspy, you… May 16, 2026 at 2:55 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.