@sampattuzzi just thought I’d point out a couple of fixes for the folder within a folder issue. You can create the project before cloning your empty repo and merely initialize and set an origin repo and push to it.
e.g.
cd myNewProject
git init
git add .
git commit -am 'Initial Import'
git remote add origin git@mygitrepo.com:myorg/myrepo.git
git push -u origin main
or if you have already got a commit in your repo (with perhaps a default license or readme), just clone the repo next to your new repo to a tmp directory:
git clone git@mygitrepo.com:myorg/myrepo.git myTmpDir
and copy its .git directory into your project:
cp -av myTmpDir/.git myNewProj/
cd myNewProj
git status
the above git status will note the missing readme and license files, copy them as well if you wish:
cp ../myTmpDir/README.md ./
cp ../myTmpDir/LICENSE ./
Now git status
should show all your new project files, this would be a great time to add a .gitignore file. I’ve notice that the default projects also include a .ignore
file containing:
/.vscode
/Content
/Intermediate
which I’m uncertain whether they should be ignored in git as well?
PS - there are other ways to get around the origin already having commits, git push -f
, deleting branches etc…