When I installed git, I made a mistake to set c:/users/jack as the root directory. But there're many unwanted folders under jack . So When I open git-bash, the directory is under jack. And when I open git-gui, there are thousands of unrelated files in the sidebar which I can't do anything to change it. So I want to create a folder called code as the root directory of git. Is there any way to achieve it without uninstalling git?(btw, I'm using windows)
            Asked
            
        
        
            Active
            
        
            Viewed 549 times
        
    1
            
            
        - 
                    1https://stackoverflow.com/q/7671461/13126651 duplicate of this? – Jatin Mehrotra Apr 06 '21 at 13:40
- 
                    Thanks for your reminder, I had seen that question before I asked. I'm not that smart to get it because that's a bit different from my problem. – Alan Gatsby Apr 06 '21 at 14:42
- 
                    1By the way, your link fixed another problem for me. – Alan Gatsby Apr 06 '21 at 15:01
1 Answers
1
            You can simply delete the c:/users/jack/.git folder and inside your code folder, initialize git using git init command
 
    
    
        Ahmed HENTETI
        
- 1,108
- 8
- 18
