Hear me out, not a duplicate.
Hi, I have a repo on gitlab which I downloaded on my local machine in zip format. Now, I want to link the downloaded local project to that existing project on gitlab. For that I did git init
and then git remote add origin <SSH url of the repo>
. It did made it a git repo and the origin has been set properly, but, all of my files have turned red(in PhpStorm), indicating that these are the new files, however the same version is present in the repo.
When I try to run git checkout master
or git pull origin master
it aborts the process: error: The following untracked working tree files would be overwritten by checkout:
.
On all the related answers that I've seen so far they have said to use git add .
and then do the initial commit and push into the repo, but, the thing is I don't want to commit or push anything right now to the repo as I think it will change all the files.
How can I make it work so that I can switch to master branch or take pull from master branch? Am I missing something basic here? Please help. Thanks!
The reasons why I'm not just taking a clone and deleting this is that, this project is dockerized and I've run all the docker commands in this folder already.