question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of new untracked files after merging with master?

See original GitHub issue

TLDR: run git clean -xi and remove all files that you didn’t create yourself, then re-install, or use snippet below.

If you’re contributing a PR and you recently merged upstream/master, you should see a lot untracked files when running git status.

This is normal: these files were previously automatically generated and added to the .gitignore. They have now been taken out of the gitignore (https://github.com/scikit-learn/scikit-learn/pull/17132) and can be safely removed.

To remove them, you can use git clean -xi. This will also remove installation files like .so, dll or .c files, so you’ll finally need to re-install scikit-learn by running e.g. pip install -e . or make in.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasHugcommented, May 25, 2020

Alternatively you can also copy/paste this if you’re on a unix system:

rm sklearn/cluster/affinity_propagation_.py sklearn/cluster/bicluster.py sklearn/cluster/birch.py sklearn/cluster/dbscan_.py sklearn/cluster/hierarchical.py sklearn/cluster/k_means_.py sklearn/cluster/mean_shift_.py sklearn/cluster/optics_.py sklearn/cluster/spectral.py sklearn/covariance/elliptic_envelope.py sklearn/covariance/empirical_covariance_.py sklearn/covariance/graph_lasso_.py sklearn/covariance/robust_covariance.py sklearn/covariance/shrunk_covariance_.py sklearn/cross_decomposition/cca_.py sklearn/cross_decomposition/pls_.py sklearn/datasets/base.py sklearn/datasets/california_housing.py sklearn/datasets/covtype.py sklearn/datasets/kddcup99.py sklearn/datasets/lfw.py sklearn/datasets/olivetti_faces.py sklearn/datasets/openml.py sklearn/datasets/rcv1.py sklearn/datasets/samples_generator.py sklearn/datasets/species_distributions.py sklearn/datasets/svmlight_format.py sklearn/datasets/twenty_newsgroups.py sklearn/decomposition/base.py sklearn/decomposition/cdnmf_fast.py sklearn/decomposition/dict_learning.py sklearn/decomposition/factor_analysis.py sklearn/decomposition/fastica_.py sklearn/decomposition/incremental_pca.py sklearn/decomposition/kernel_pca.py sklearn/decomposition/nmf.py sklearn/decomposition/online_lda.py sklearn/decomposition/online_lda_fast.py sklearn/decomposition/pca.py sklearn/decomposition/sparse_pca.py sklearn/decomposition/truncated_svd.py sklearn/ensemble/bagging.py sklearn/ensemble/base.py sklearn/ensemble/forest.py sklearn/ensemble/gradient_boosting.py sklearn/ensemble/iforest.py sklearn/ensemble/voting.py sklearn/ensemble/weight_boosting.py sklearn/feature_extraction/dict_vectorizer.py sklearn/feature_extraction/hashing.py sklearn/feature_extraction/stop_words.py sklearn/feature_selection/base.py sklearn/feature_selection/from_model.py sklearn/feature_selection/mutual_info.py sklearn/feature_selection/rfe.py sklearn/feature_selection/univariate_selection.py sklearn/feature_selection/variance_threshold.py sklearn/gaussian_process/gpc.py sklearn/gaussian_process/gpr.py sklearn/inspection/partial_dependence.py sklearn/linear_model/base.py sklearn/linear_model/bayes.py sklearn/linear_model/cd_fast.py sklearn/linear_model/coordinate_descent.py sklearn/linear_model/huber.py sklearn/linear_model/least_angle.py sklearn/linear_model/logistic.py sklearn/linear_model/omp.py sklearn/linear_model/passive_aggressive.py sklearn/linear_model/perceptron.py sklearn/linear_model/ransac.py sklearn/linear_model/ridge.py sklearn/linear_model/sag.py sklearn/linear_model/sag_fast.py sklearn/linear_model/sgd_fast.py sklearn/linear_model/stochastic_gradient.py sklearn/linear_model/theil_sen.py sklearn/manifold/isomap.py sklearn/manifold/locally_linear.py sklearn/manifold/mds.py sklearn/manifold/spectral_embedding_.py sklearn/manifold/t_sne.py sklearn/metrics/base.py sklearn/metrics/classification.py sklearn/metrics/cluster/bicluster.py sklearn/metrics/cluster/expected_mutual_info_fast.py sklearn/metrics/cluster/supervised.py sklearn/metrics/cluster/unsupervised.py sklearn/metrics/pairwise_fast.py sklearn/metrics/ranking.py sklearn/metrics/regression.py sklearn/metrics/scorer.py sklearn/mixture/base.py sklearn/mixture/bayesian_mixture.py sklearn/mixture/gaussian_mixture.py sklearn/neighbors/ball_tree.py sklearn/neighbors/base.py sklearn/neighbors/classification.py sklearn/neighbors/dist_metrics.py sklearn/neighbors/graph.py sklearn/neighbors/kd_tree.py sklearn/neighbors/kde.py sklearn/neighbors/lof.py sklearn/neighbors/nca.py sklearn/neighbors/nearest_centroid.py sklearn/neighbors/quad_tree.py sklearn/neighbors/regression.py sklearn/neighbors/typedefs.py sklearn/neighbors/unsupervised.py sklearn/neural_network/multilayer_perceptron.py sklearn/neural_network/rbm.py sklearn/preprocessing/data.py sklearn/preprocessing/label.py sklearn/semi_supervised/label_propagation.py sklearn/svm/base.py sklearn/svm/bounds.py sklearn/svm/classes.py sklearn/svm/liblinear.py sklearn/svm/libsvm.py sklearn/svm/libsvm_sparse.py sklearn/tree/export.py sklearn/tree/tree.py sklearn/utils/fast_dict.py sklearn/utils/mocking.py sklearn/utils/seq_dataset.py sklearn/utils/weight_vector.py 

You shouldn’t need to re-install

0reactions
NicolasHugcommented, Feb 15, 2021

It’s been a while, this is probably not relevant anymore so I’ll close and unpin the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

git - The following untracked working tree files would be ...
The problem is when we have incoming changes that will merge untracked file, git complains. These commands helped me: git clean -dxf git...
Read more >
git pull error: The following untracked working tree files would ...
Pulling a new master ends with the following error: $ git pull error: The ... untracked working tree files would be overwritten by...
Read more >
Working Tree Files Would Be Overwritten by Merge
The error: the following untracked working tree files would be overwritten by merge is triggered when we are trying to pull a remote...
Read more >
How do I force git pull to overwrite local files? - Tower Git Client
Please be careful with these commands: discarding local changes and untracked files cannot be undone! Step 2: Pull Again. After you have cleaned...
Read more >
How to git clean untracked files example - TheServerSide.com
This article is on the 'git clean' command, which is used to delete untracked files from the local working tree.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found