0

First of all, I am new to sourcetree.

Mostly when we change/add/remove a file in an existing file in repository, it gets reflected in the sourcetree's uncommitted changes.

I have added a new cartridge in my eCommerce Salesforce project. But even after refreshing or restarting my sourcetree, I cannot see the applied changes in the uncommitted changes.

I have checked modified files, pending files, untracked files and all files option too.

So what can I do to track the changes applied to the newly added cartridge?

Note: The cartridge is not committed yet.

Thanks in advance.

Code_Ninja
  • 1,729
  • 1
  • 14
  • 38
  • How is sourcetree connected to Salesforce? I guess there must be some kind of config files? I do not know sourcetree but I would think that the first step is to get your new files (cartridge) from salesforce to your local host and than to add everything into the git repositiry – utm May 29 '18 at 06:06
  • okay thanks.. the issue is sorted. The issue was that I needed to add that cartridge in the same folder as others. Now I can track the changes in the source. This is a silly mistake well noted. Thanks @utm anyways. – Code_Ninja May 29 '18 at 09:27

1 Answers1

1

Looks like you got it sorted out OK which is great news. I'll throw this answer in just in case others come along and are looking for a solution.

Basically you just want to make sure that the directory where your new cartridge lives is added to the git repo. In my case- using Demandware- my git config lives in a directory that's two above my cartridges. It's something like this...

gitConfigLivesHere/../code/cartridges/cartridgesLiveHere

I'm thinking you might have your git keeping track of individual cartridges, but I've definitely found it easier to have your config live a couple levels up and then it will automatically track changes much more easily.

This solution also allows you to keep other files in source control that aren't cartridges... for instance any dw.json settings files or gruntbuild.js files that would live outside of your cartridges.

Hope this helps, Brad

Brad
  • 261
  • 1
  • 3
  • 12
  • Thanks for the above solution, it will work definitely. But my repository structure allows to track changes directly with just one path to be taken care of. I have all the grunt files, gulp files and the package.json in the the root folder of the repository. So if I maintain that folder and all the changed folders/files/cartridges are in that folder/repo anywhere in any folder, they are tracked in sourcetree. Thanks anyway for the above solution. – Code_Ninja May 30 '18 at 02:22