Ignore git directory

We are working on erlang

and chicagoboss

for some projects. ChicagoBoss is the foundation. When we create it project1

, it will look like this:

.
├── cb_admin
├── ChicagoBoss
├── ebin
├── project1
└── vagrant

      

And we did git init

just for project1

. Later after finishing project1

we created in it another project2

s git init

.

├── cb_admin
├── ChicagoBoss
├── ebin
├── project1
├── project2
└── vagrant

      

Sometimes when I work in project1

git, the status shows me the following output:

$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ../project2/

nothing added to commit but untracked files present (use "git add" to track)

      

Even if project2

nothing is fixed. Why are unprocessed files appearing? However, to make sure I went into my directory project2

and did git status

:

$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ./

nothing added to commit but untracked files present (use "git add" to track)

      

So, to ignore the line for locals only, I ran the following command with no success:

$ git update-index --assume-unchanged ./
Ignoring path gift_tax/

      

Can you help me?

  • What is displayed there ./

    ?
  • How can I only ignore it locally, the changes shouldn't reflect my remote directory.
+3


source to share


1 answer


../project2/

(from project1 status) and ./

(in project2 status) are consistent with those git init

done in root folder (and not in project1 or project2)

Oh, okay, someone from our team may have done in the root folder

Find the folder .git

. It is probably located in / and not in project1

orproject2

Do you know what's in there ./

?



Because it is project2

not added to the repo that is in /

.


Possible solution (warning: it will lose current history)

  • delete the folder /.git

    ,
  • execute a git init

    in project1

    and project2

    ,
  • in each project, add and commit.
+3


source







All Articles