My Home (~/) dir somehow got added as part of my git repo, now i can't remove it

I noticed that my git status suddenly includes my ~/ dir. When I did a git add . -A It included some files that were recently included into the directory. I don’t know how they got there in the first place, but when i call git rm --cached ~/ it refuses saying:

fatal: /Users/me/: '/Users/me' is outside repository

How can i get rid of this from the repository?

  • What is a good workflow for Continuous Deployment to a VPS using Travis CI and Capistrano?
  • Angular-route bower download issue
  • git: setting a single tracking remote from a public repo
  • Differences between MinGW from msysgit (aka Git on Windows) and MinGW from MinGW.org
  • I copy a git repo into another git repo, how to restore?
  • How to filter only the lines that are modified in the git context format
  • UPDATE: on request here is my git status output:

    On branch temp
    Your branch is up-to-date with 'origin/temp'.
    
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
        modified:   gradle.properties
        modified:   gradle/plugins/idea.gradle
        modified:   gradle/plugins/info.gradle
        modified:   gradle/plugins/stage.gradle
        modified:   myproject.gradle
        new file:   ~/NewDir/my.ear
        new file:   ~/NewDir/build.gradle
        new file:   ~/NewDir/deploy-grenade
        new file:   ~/NewDir/deployment/install_template.py
        new file:   ~/NewDir/deployment/uninstall_template.py
        new file:   ~/NewDir/gradle.properties
        new file:   ~/NewDir/gradle/wrapper/gradle-wrapper.properties
        new file:   ~/NewDir/gradlew
        new file:   ~/NewDir/gradlew.bat
        new file:   ~/NewDir/settings.gradle
        new file:   ~/NewDir/timestamp.txt
    

  • Accidentally set “remote.master.url”, cannot get rid of it anymore?
  • Is it possible to delete a particular Commit from Git Branch(Local and Remote)?
  • How does a git branch relate to other branches in my repo?
  • Commits already pushed but still remain in the local repository
  • Git checkout <SHA> and Heroku
  • TortoiseGit context menu options disappeared
  • One Solution collect form web for “My Home (~/) dir somehow got added as part of my git repo, now i can't remove it”

    Turns out the directory ‘~‘ is actually a Dir under my git repository and not the actual shell-resolved home directory. Thanks @Paul Hicks for the insight.

    Git Baby is a git and github fan, let's start git clone.