Do not ignore files in git sourcetree

I am loading an eclipse project from a source tree. The .project and .classpath files are not checked. I want these flags to execute a successful import. I do not have a gitignore file. Can anyone shed some light on why these files are not found?

I also looked at the source machine, which checked these files and the files there. In the sourcetree version on this machine, it no longer displays the files that need to be checked.

My exlude file looks like this: # git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ .DS_Store 

This also seems to be wrong.

Thanks!

+4
source share
3 answers

you can see what has not yet been completed or delivered with

 git status 

This should show that these files are not yet tracked. You can start tracking them by adding them to the index:

 git add .project 

or add all files (not recommended if you do not already have the corresponding .gitignore):

 git add . 

or

 git add -A 

if you want to also perform the uninstall.

Another thing that can happen here is that you simply don’t see that the .project file is there. Usually, OSs hide them by default. Use

 ls -A 

include these file types in the directory listing. To view the contents of what git is saved in the last commit, you can also use

 git ls-tree HEAD 
0
source

Either your files were not transferred to the repository, as @ adam-dymitruk told you, or you ignore them. Run this command:

$ git config --get core.excludesfile

And look at the file you get. You may have some templates that exclude your IDE files. I know that PHPStorm asks you at some point to exclude your files around the world. Maybe someone (or eclipse) did the same on your original machine.

+7
source

In addition to the repo-local .gitignore file, the parameters specified in the .git/info/exclude file, or using the configuration at the global level, can be additionally ignored in the repository. You will probably have to check these things on the sending machine, as the files are not checked where the files are.

+5
source

All Articles