Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import local project with existing files to Source tree

Tags:

git

tree

I'm using Source tree. But I have existing project folder with files in it. I want to import project folder to Source Tree. I tried to remove files from project and then add folder to Source Tree with:

Clone/New

After that I added my project files. But I can't commit and push my changes and it's not showing latest changes when I change file from project. I've read questions and I couldn't find in Source Tree menu :

Repositories > import repository

How to import my project?

like image 367
ivva Avatar asked Dec 03 '15 19:12

ivva


1 Answers

Seems like you're missing the .git folder. You should:

  1. Create a new empty repository on your git client.
  2. Clone it by source tree.
  3. Copy the .git folder to your existing project folder.

At this point source tree should alarm you that the repository local location was changed, just follow it's interface in order to change the location, and you're done.

like image 147
oshnaps Avatar answered Sep 29 '22 01:09

oshnaps