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

Can't add existing project to existing repo

Alex Labanino February 7, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 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?

Alex Labanino February 7, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 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?

Alex Labanino February 7, 2018

Does it has a push limit? 

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2018

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

Alex Labanino February 7, 2018

Yes, number of files in a push.

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2018

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

Alex Labanino February 7, 2018

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

Alex Labanino February 7, 2018

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

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 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
TAGS
AUG Leaders

Atlassian Community Events