> from '  git rev-parse --show-toplevel ' is C:/Users/'My name'. 

This result indicates that that particular Git invocation believes that 
there is a repository who's top level is at ' C:/Users/'My name'. hence I 
would expect that you will find a potentially hidden '.git' folder located 
at "C:/Users/'My name'/.git" - check its creation date (and the files 
within it) etc to see when that happened.

Also try `cd /` followed by 'pwd -W' to determine where that Git's bash 
root is located (Windows does not really have a root folder, so the 
particular Git program has to "chose" one).

Further try `cd ~` followed by `pwd -W` to see where that your bash user 
folder is located (which may well be that top-level detected above, and 
would be the directory path when the Git bash is started..

Assuming that you never wanted to have a Git repository for you complete 
C:/Users/'My name' folder (including desktop), and that there was nothing 
you specially committed, then simply delete the complete "C:/Users/'My 
name'/.git"folder to wipe out any record of this 'mistake'.

P.
On Tuesday, October 27, 2020 at 2:49:22 PM UTC anca...@gmail.com wrote:

> Thank you for your answers.
>
> The result from  `pwd -W` is C:/Users/'My name'/Desktop/'The name of the 
> folder' and from '  git rev-parse --show-toplevel ' is C:/Users/'My name'. 
> I checked and there is no ".git" file in hidden files (I suppose because I 
> never run "git init"). I am not worried about Git taking up space but about 
> deleting files from my computer and not just from its local folder of 
> copies.
>
> I know that Desktop is just another folder but a lot of my files are 
> there. This is what it shows when I run ls -asF: 
>   total 28
>  0 ./  24 ../   4 assets/     
> All of the commands were run in the same 'Git Bash Here' ~/Desktop/ 'The 
> name of the folder' (master).
>
> Pe duminică, 25 octombrie 2020, la 19:43:11 UTC+2, Michael Gersten a scris:
>
>>
>> On 2020-10-25, at 6:05 AM, Anca Jain <anca...@gmail.com> wrote: 
>>
>> > Hi! I am a beginner to Git. I opened a folder located on my Desktop 
>> with “Git Bash Here”. I run “git add.” without entering “git init” first. 
>> Now almost all of my computer files (the ones on the Desktop) are in the 
>> “Untracked files” folder. 
>> > 
>> >... 
>> > 
>> > I need a command to make Git let my Desktop files alone. I don’t want 
>> to commit my whole computer in Git, I just want to get to “working tree 
>> clean” without deleting all of my documents. The suggestions I found on the 
>> internet require a risk of being left with nothing on my computer. 
>>
>> So just as a first comment, it's not your whole computer that's in Git. 
>> Your desktop is just another folder in Microsoft Windows. I think (it's 
>> been years since I've trusted Microsoft-Brand graphical windowing operating 
>> system) that it's in HOME_DIRECTORY/Desktop on modern versions (again, has 
>> moved over the years) -- so typically C:\Profiles\Yourname\Desktop, I 
>> think. 
>>
>> "dir" on windows has support for hidden files, that are not displayed by 
>> default. If you have a special git bash shell, you probably have a full set 
>> of unix-like commands. 
>>
>> So, send us a copy of the output from: 
>>
>> ls -asF 
>>
>> and we can help figure out what happened. 
>> (That's like asking "dir" to include hidden files, but I don't remember 
>> the option to dir to do that.) 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/1cc663e2-2750-4cac-9f11-b5363576c731n%40googlegroups.com.

Reply via email to