Frage

so I created a new directory called "Repository" WITHOUT adding, committing, and pushing

I then added this to my .gitignore

/home/users/user/httpdocs/Repository/*
/home/users/user/httpdocs/Repository

I also did this

cd /home/users/user/httpdocs/Repository

git update-index --assume-unchanged $(git ls-files | tr '\n' ' ')

but then whenever I do git status the directory will still appear:

 Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       Repository/
nothing added to commit but untracked files present (use "git add" to track)

How do I get that directory disappear from git status accordingly

War es hilfreich?

Lösung

If your git repo is located in /home/users/user/httpdocs, your .gitignore should just need Repository. .gitignore paths are relative.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top