Git pull - the following unprocessed tree work files will be overwritten by merge

I am trying to do git pullin the main branch and I see this message with a long list of files

The following untracked working tree files would be overwritten by merge:

I really don't care if these files are written or not, since I need to get the latest form of the remote. I looked it over and I can’t do it git fetch, git add *andgit reset HARD

When I do git status, it shows me a list of only files without a trace. I do not want to commit these files

+4
source share
2 answers

you can delete unused files before pulling out the deleted file

git clean -f

n, , .

git clean -f -n
+1

, , .

1) test.txt git git.

2) test.txt git . ( ) git, ( ) git.

3) :

[ics@bucky ics_client]$ git pull origin
gituser@h2oamr password: 
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From h2oamr:ics_client
   193ac65..a6da6b2  master     -> origin/master
Updating 193ac65..a6da6b2
error: Untracked working tree file 'test.txt' would be overwritten by merge.  Aborting
[ics@bucky ics_client]$ 

, . , git, , .

git, .

git, , -, .

These files are the part of my git repo but I want them to be over written in master – baig772

, git, . , , , , , git git .

- - - .

0

All Articles