Ok, this is a similar question to https://community.atlassian.com/t5/Sourcetree-questions/How-to-create-a-GIT-repository-in-existing-folder-full-of-files/qaq-p/264461 but yet a bit different.
Here is the scenario. A have an existing directory on my computer that has existing files in it. This directory is not under GIT control at all now. I want to associate this folder to an existing remote branch (B1) on an existing remote repo (RemRepo1).
I was wondering how I would do this with sourcetree. I am suspecting that you can't use the wizard how you create a sourcetree project and you would have to do some bash commands like first GIT init the folder to make a local repo and somehow go from there but I am not sure how - or with luck if there is a simpler way. The directory (and the remote existing repo branch) is rather large so checking out that whole remote repo and branch in one place and pasting all the code into it might not be ideal but I am open to whatever I need to do to best accomplish this.
I'm afraid its not possible to achieve this without having the repository locally on disk. My recommendation is to clone the repo and checkout the branch you need. Then, move the directory to the location you need, add all the new files in Sourcetree to be tracked and you are good to commit and push.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.