Toad World® Forums

How to use Git on TDM 6.5

Hello, I am using TDM 6.5 and I need to know how it works with Git (I have a local and a remote repository) but I need some pdf document or video link in order to learn and implement this.

Thanks in advanced.

Regards,

Hello,
please see Feature and Tools -> Version Control -> Git Version Control chapter in help.
Note that you need GIT client installed on your system. Next you need make decision if you want work with GIT by project or out of project. If you need out of project you need have all files in Working Folder (or subfolder ) that is determined by
Options -> Application -> Version Control System

When you set it right and open model from working directory you will see in Application window toolbar with Git function (must be active this model). Same function are available from context menu of this model.

Similar is for project. Advantage of project is that you can have more working directory. I mean one for each project. Project has it's own setting for GIT in project options.

For remote repository (function fetch, pull, push ) you need set repository path and user credential.

If you will have any problem don't hesitate contact us

Regards
Daril

Great. Thanks for the help.

I want to know something:

I began to work in my physical model A within my project A.

  1. If I add an entity (table) how do I start tracking changes (versioning my database)? I want the first version 1.0 for example. But if I add another table later I want to call it 1.1 for example.

  2. Git and version manager work together?

Thanks in advanced.

Hi,
I presume you mean Version manager of TDM. It is little obsoleted functionality and it is replaced by GIT and SVN. So my recommendation is not to use Version manager.
If you want to track changes in your model you need add it to Git repository and do commit.

Daril

Ok. I got it.

Questions:

  1. Do I have to push the changes in the model or the project?

  2. I am having issues pushing changes to my Git remote repo. I do a change and I do not see the Commit button enabled.

Thanks again for the help.

HI,

  1. It's up to you. You can use Git on project or on model. If you would like use it without project you have to save model to working directory(Settings->Options->Version Control System->Git->Working Directory). You can track every what is saved to hdd. Model is one file, project another.

  2. See the example, when I added model to Git Project
    Git project without model
    image

Add new model
image

Click add to repository -> Change state of model
image

Commit
image

After Commit
image

Some modification and save
image

Commit
image

Try to Push -> Get login dialog
image

You can review operation in Message Explorer

I hope it is help

Regard
Daril

Good. It worked.

I was trying to go back to a previous change and got an error: "The upstream branch is not set". why this?

Thanks again for the help.

Regards,

Hello Geraldo,
sorry to hear that. Looks like a bug. We will look into this and fix it till next version.

Regards, Michal

I see. And the big question is: when is it going to be available? Hehehe.

Thanks for the help.

Hello Geraldo,
I've tested your issue at Toad Data Modeler 6.5 (same version as you've mentioned you have) and I'm not able to simulate this error.

My process (step by step) is following:

  1. I've created New project with an option to create Git repository (look for term "Projects, Create New Project" at our help - Help > Help Topics)
  2. Created and saved new model and added it to the project
  3. Added to Git and commited (optionally pushed to server) (for more info, look for term "Git" at our help; Daril also described how to commit model in one of previous posts)
  4. Made some changes and commited again
  5. Opened History Browser
    appView
    this opens following window
    historyBrowser
    ... as you can see, I have 2 commits at selected model
  6. Now I can switch between revisions by selecting them and clicking Checkout Revision
    checkoutRevision
  7. Standard behaviour is that the selected revision is Checked out into working directory and if the model is opened, it reloads to mirror the model in working directory (in our case the revision I've checked out). And that's exactly what happened.

Warning: In current state, Toad Data Modeler does not support work with multiple branches.

Regards, Michal