I ran an initial commit of all of my code on 29th January. I've been working on the code on and off and wanted to check in the changes. When I go into my repository in SourceTree all of the files show up in Files in the working tree with + symbols indicating that they are new files. Selecting any of them shows the entire contents of the file from when I checked the files in in January. I've checked the bitbucket website and the files were definitely correctly checked in on the intial checkin. When I try and commit there are no files showing up because SourceTree has decided that nothing has changed.
I haven't used source control a great deal and have run into significant problems with it in the past (including wiping out 2 months worth of work on one occasion) so I don't know how to proceed.
You should be able to re-copy the directory with your latest changes into the git-controlled working copy without any issue. Just make sure that the directory where you made your changes does NOT have a hidden .git directory, as that would overwrite your repository, not just your working copy.
SourceTree has no capability to do this unless you manually clone within SourceTree itself. There's no copy functionality, and clones are only done through the clone dialog unless you pull down a subtree/submodule (which is also a manual operation)
Source: SourceTree developer (me) ;)
I THINK that what happened was:
When I was creating the repository I tried to connect it directly to my original source code root folder
SourceTree told me it couldn't clone to a non-empty folder
I cloned to a slightly differently named folder and then copied the files across to check them in (leaving it uploading for quite a while)
When I returned to my code a few days later I COMPLETELY forgot to work in the new working folder and continued working in the original folder (which wasn't being tracked by SourceTree)
What I can't understand is why I couldn't nominate a non-empty folder as my working folder when my bitbucket repository had no files in it at all? I can understand there would be a problem if there was existing code in the repository but surely I should be able to say 'here you go empty repository, this is my working folder I've been using up until I decided to put the code under source control'???
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG