Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't add existing project to existing repo

I am totally exhausted with this issue. I have tried everything I can think of.

Ok, in Sourcetree, the little window, in the "New" drop-down, I clicked the "Create Local Repository" and selected "Also create remote repository" and follow the instruction to create the remote repo. Easy!

If I add a new file to the repo, I can see right away in Sourcetree and I am able to commit and push. 

But if I add a project that has many files and directories in it, Sourcetree will do nothing. If I try to `git add .` in the terminal, it starts giving hints about creating a submodule and I don't want to do that.

All I want is to create a repo and add a bunch of files and directories in that repo.

What am I doing wrong? Any help?

1 answer

1 accepted

0 votes
Answer accepted
Manju Atlassian Team Feb 07, 2018

What version of Sourcetree and on what platform are you trying this?

Are you trying to add directories which are already tracked in a different repository?

Sourcetree 2.7, macOS High Sierra v.10.13

No, I was working on this project locally and want to add it to a repo.

Manju Atlassian Team Feb 07, 2018

Did you ever create a local repo when you started working on the project?

Can you check if there is a .git folder inside the directory you are trying to add?

If not, can you send a screenshot of what you see in Sourcetree when you add the new files and folders?

Does it has a push limit? 

Manju Atlassian Team Feb 07, 2018

What are you referring to when you say "push limit"? Number of files? Number of pushes per minute? 

Yes, number of files in a push.

Manju Atlassian Team Feb 07, 2018

No, not that I know of. But how many are you trying?

I tried rm -rf .git, that should remove any git tracking. 

Yes, it was a .git tracking file. Already pushed everything to repo. Never thought about it. Thanks.

Manju Atlassian Team Feb 07, 2018

I'm glad you figured out. 

However, the next time you don't have to delete all of this. You can just add your local repo to the repository browser and from the repo window, add a remote to it. That way, everything is exactly the way you wanted in your project. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,789 views 4 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you