Question

I have a project created in Netbeans IDE and synchronized with remote server, I'm using also Smartgit/HG for GIT managment. Few days ago I synchronize my project between my local PC and the remote server and a few files appear. See the image below:

enter image description here

I don't know where those files come from and I can't commit/push them since others members on my team has been working on them, what is the best way to solve this since those files still appearing in my repo and sometimes I can't commit/push?

Was it helpful?

Solution

If you have some untracked files, that means they are only local to your computer and they do not exist in git repository on server or on other developers computers.

As for why they have appeared - it must be some script (makefile or similar) or your IDE that created them. You may want to clone whole repository afresh into another directory to confirm that your project is working fine even without those files.

If you want to ignore some files or directories from git control, and even don't see them as untracked, you should create appropriate .gitignore file, preferrably in the root directory of your git repository. This file contains set of rules which files, directories or file extensions for git to ignore - typically object files, executables, log files or other files that tend to be generated automatically and are not worth committing.

OTHER TIPS

One solution would be to reset your local repo in order to make sure the working tree reflects HEAD (without any untracked file)

Make sure you don't have any work in progress, in other words: backup first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top