* How to Not Track .metadata
@ 2020-05-13 23:51 Mark Wartman
2020-05-14 0:51 ` brian m. carlson
0 siblings, 1 reply; 2+ messages in thread
From: Mark Wartman @ 2020-05-13 23:51 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
Hello,
In a sentence, I cannot get Git to not track a .metadata file. How would I correct this?
Please see .txt files as the mail system would not allow me to mail it.
I can say that I did try running: git clean -n
I realize that the -n is for a dry run but it did not return anything anyway.
I am using:
git version 2.10.1 (Apple Git-78)
OS X El Capitan version 10.11.6
Thanks,
Mark Wartman
[-- Attachment #2: how-to-not-track.txt --]
[-- Type: text/plain, Size: 1159 bytes --]
I have cloned a repository that a particular .metadata file was pushed too. This .metadata file seems to be causing me many git conflicts and other issues with Eclipse.
So lets say I had a folder named rev. I navigated into the folder rev which there was nothing in there to start with. I ran the command:
git clone https://github.com/BenArayathel/0427Java.git
So now 0427Java lives inside of rev
Then inside of 0427Java there is folder called usf-batch-workspace
Inside of usf-batch-workspace are java projects that I and my fellow batch-mates work on. I have a .gitignore in all three of:
java-project, usr-batch-workspace, and 0427Java and all three .gitignoreâs are the same.
I suppose hierarchically it might look like:
rev <---------( regular folder not tracked )
0427Java
usr-batch-workspace
java-project
Inside my .gitignore I have used these:
/.metadata/
/usf-batch-workspace/.metadata/*
**/.metadata/*
# Created by https://www.gitignore.io/api/eclipse
# Edit at https://www.gitignore.io/?templates=eclipse
### Eclipse ###
.metadata
# as well as the rest of the provided template
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to Not Track .metadata
2020-05-13 23:51 How to Not Track .metadata Mark Wartman
@ 2020-05-14 0:51 ` brian m. carlson
0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2020-05-14 0:51 UTC (permalink / raw)
To: Mark Wartman; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]
On 2020-05-13 at 23:51:44, Mark Wartman wrote:
> Hello,
>
> In a sentence, I cannot get Git to not track a .metadata file. How would I correct this?
>
> Please see .txt files as the mail system would not allow me to mail it.
>
> I can say that I did try running: git clean -n
> I realize that the -n is for a dry run but it did not return anything anyway.
>
> I am using:
> git version 2.10.1 (Apple Git-78)
> OS X El Capitan version 10.11.6
>
>
> Thanks,
>
> Mark Wartman
>
>
>
> I have cloned a repository that a particular .metadata file was pushed too. This .metadata file seems to be causing me many git conflicts and other issues with Eclipse.
>
> So lets say I had a folder named rev. I navigated into the folder rev which there was nothing in there to start with. I ran the command:
> git clone https://github.com/BenArayathel/0427Java.git
>
> So now 0427Java lives inside of rev
>
> Then inside of 0427Java there is folder called usf-batch-workspace
>
> Inside of usf-batch-workspace are java projects that I and my fellow batch-mates work on. I have a .gitignore in all three of:
> java-project, usr-batch-workspace, and 0427Java and all three .gitignore???s are the same.
I believe your problem is that the .metadata directory is already
tracked. A .gitignore file has no effect on files that are already
tracked.
If you want to have those files ignored, then you need to remove them
first, by running "git rm -r --cached usf-batch-workspace/.metadata" if
you want to keep the files locally and without the "--cached" if you
want to remove them from the working tree as well.
Note that the files will be removed from others' systems when they pull
that change into their branches, which is by design.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-14 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 23:51 How to Not Track .metadata Mark Wartman
2020-05-14 0:51 ` brian m. carlson
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).