Toad World® Forums

Best practices for working with Git in Toad For Oracle?


#1

As mentioned in another post, I am setting up Git in Toad.

This brings me to the question: What are best practices for working with Git in Toad?

We have several developers working on the same database. I know that I could set up Code Collections for different database objects. But which repositories should each developer commit to?

It seems that it is only possible to choose a local git repository, so I guess that each developer should just commit to his/her local repository. But how do I ensure that all developers’ repositories are in sync? Would it be possible to make Toad pull/push from/to a central directory before/after each commit?

Or are there other best practices we should follow?


#2

Hello,

This is a great question. I would be very interested in hearing the response of users to this, in particular as to proposed best practices from within the
Toad environment.

We deliberately designed Git in Toad to work in a local copy of the repository, and kept it very simple, until we got a better understanding of how Toad developers
are using Git with Toad, or more accurately need to use Git with Toad. In practice, this is how Toad also works with centralized VCS systems. The repository is set up outside of Toad. A local workspace is set up. Then Toad interacts with the remote repository.

As currently designed work flow looks something like this:

Ø
Outside of Toad

o
Clone/Init - create or get a local copy of repository.

o
Pull - Fetch merges/changes from remote repository.

Ø
In Toad

o
Edit - local copy of objects

o
Stage - Add local changes to staging area. In Git perform ‘Add’ command.

o
Commit local changes.

Ø
Outside of Toad

o
Push – Push local changes/merges to remote repository.

While I understand where you are coming from, I do not think that Toad should make a pull/push from the central repository before each commit. I think this would mean that Git is behaving like
a centralized VCS system. I think we should investigate the value of adding Pull/Push capabilities directly from Toad. This is where a better understanding of practical customer work flows, would be very helpful. Maybe you could add this to the Idea Pond?

Stephen

From: zbignev [mailto:bounce-zbignev@toadworld.com]

Sent: Wednesday, April 30, 2014 11:12 AM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Best practices for working with Git in Toad For Oracle?

Best practices for working with Git in Toad For Oracle?

Thread created by zbignev

As mentioned in another post, I am setting up Git in Toad.

This brings me to the question: What are best practices for working with Git in Toad?

We have several developers working on the same database. I know that I could set up Code Collections for different database objects. But which repositories should each developer commit to?

It seems that it is only possible to choose a local git repository, so I guess that each developer should just commit to his/her local repository. But how do I ensure that all developers’ repositories are in sync? Would it be possible to make Toad pull/push
from/to a central directory before/after each commit?

Or are there other best practices we should follow?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#3

Hey,

Exactly Stephen!!! I am also looking for this functionality since long time, to directly pull/push to repository without any external tool.

I am not very well familiar with GIT commands. So what I am doing currently, every time opening MyEclipse to push my locally committed changes to GIT, which is worthless and waste of time. It will be really nice, if this functionality can be added into Toad VCS navigation pane.

Thanks,

Manu


#4

Manu,

Has this capability been added that you know of?


#5

4 years after OP… same question

We are migrating from TFS to VSTS and I am looking for any advice re. TOAD / VSTS or TOAD over a git repository as an alternative. Is this still an unknown? Are we still forced to work with git outside of TOAD?

THanks,

-Nick


#6

In Toad 12.12 and earlier, all clone, pull and push operations need to be managed outside of Toad for Oracle. Toad for Oracle 13.0 will support clone, pull and push operations from inside Toad for Git and Mercurial. Support has been added for the next beta.

As far as VSTS is concerned, there are a few things to consider:

  1. The Visual Studio Team Services client in Toad is designed for TFVC repositories only. The REST API’s are very different for Git repositories stored in Visual Studio Team Services than they are for TFVC.

  2. You will need to configure “Alternate Credentials” for your Visual Studio account in order to access your repository.

  3. Forcing revisions in Toad is not currently supported by VSTS. Attempting to do so will return an error from VSTS.

  4. You will have access to work item tracking when using the Visual Studio Team Services client.
    For VSTS-hosted Git repositories:

  5. You should be able to use the Git client within Toad for Oracle and simply clone from the VSTS server.

  6. You will need to configure “Alternate Credentials” or “Personal Access Tokens” for your VSTS account in order to pull/push to your repository

  7. You should enable Git’s credential manager to securely handle your username and password or personal access token when performing pull/push operations

  8. Forcing revisions in Toad is not supported by Git. Git has no ability to force a revision of unchanged code.

  9. You won’t have access to work item tracking when using Git within VSTS.
    I hope this helps answer your question. Please feel free to let me know if you have any others.

Thanks,

-John


#7

For Toad 12.12 and earlier, you can also work around the clone/pull/push issue by setting up External commands within Toad to transfer changes between your local Git repository and the server’s Git repository. Matthew Phan wrote a blog article here that may help you in creating that:

http://www.toadworld.com/products/toad-for-oracle/b/weblog/archive/2017/10/31/binding-toad-automation-and-external-tools-to-your-custom-icons-and-keystrokes

-John