Skip to content

Project team work

DBeaver is fully integrated with the Git team work/version control system. You can keep your project configuration, scripts, diagrams, bookmarks and other artifacts in a Git repository.

This extension is included in the EE version. Also it could be installed to CE version manually.

Marketplace URL:https://marketplace.eclipse.org/content/dbeaver-git-support

P2 repository URL:https://dbeaver.io/update/git/latest/

Create Repository

Share Existing Project

This includes three main steps:

  • creating local git repository
  • creating remote git repository
  • sharing your project

These steps in detail:

  1. Open Projects tab, then choose Project that you need to share and choose Team - Share project from the context menu:

image

  • Create a new local repository or choose an existing one:

image

  • Create a new GitHub repository. Please, pay attention to security. The repository shouldn't be public as there are credentials to the databases you are working with. Here you fill in the Repository name, Description, Accessibility and click Create repository:

image

  • Then, on the page of the repository at GitHub, click on the Code button and copy the URL:

image

  • On the DBeaver's side, paste the URL of the GitHub repository. You have to specify GitHub User and Password. Please, pay attention that you have to use your GitHub username, but instead of a password, you specify GitHub access token. We also recommend ticking Store in Secure Store in DBeaver below:

image

  • GitHub access token locates at Settings/Developer Settings/Personal access tokens. You need to generate the new one and tick some options: all from ā€˜repo’ section (repo:status, repo_deployment, etc.), but if we speak about organization, you should also tick ā€˜read:org’ in section admin:org. Please, pay attention that you will see this token only once:

image

  • When you click Finish on the Source Git Repository form, you will have to generate a password for all the secure data in DBeaver. Please, remember it.

  • Commit the project by right-clicking the project node and selecting Team - Commit… or Ctrl+# from the context menu. Enter a commit message (the first line should be headline-like, as it will appear in the history view) and hit the Commit button. If the commit was successful, the question icons will have turned into repository icons:

image

  • Then push changes to a remote repository using Push HEAD button:

You can learn more here

Cloning existing repositories

Please, pay attention that you need to have a GitHub account.

  1. Choose Create Project from Git button at Projects Tab or File - Git - Create Project in Main menu:

image

  • On the first page of the wizard enter the location of the remote repository. Make sure the repository's owner has given you access to it. Here you have to spicify GitHub User and Password. Please, pay attention that you have to use your GitHub username, but instead of a password, you specify GitHub access token. We also recommend ticking Store in Secure Store in DBeaver below:

image

  • The remote repository's location comes from the repository's page at GitHub. Please, click on the Code button and copy the URL:

image

  • GitHub access token locates at Settings/Developer Settings/Personal access tokens. You need to generate the new one and tick some options. Please, tick all from ā€˜repo’ section (repo:status, repo_deployment, etc.), but if we speak about an organization, you should also tick ā€˜read:org’ in section admin:org. Please, pay attention that you will see this token only once:

image

  • On the next page choose which branches should be cloned from the remote repository:

image

  • On the next page in DBeaver define where you want to store the repository on the local file system and define some initial settings:

image

  • Choose the type of wizard you want to use and then finish repository cloning. The project should now appear in the Navigator/Project Explorer:

image

More information could be found here

Work with Project (Connections, Scripts, etc.)

If some changes were made, e.g., Connection, Script or ERD was created, deleted or changed and you want to update your remote repository, you should:

  1. Go to the Context menu of the project (Projects tab) and choose Team - Commit:

image

  • Git Staging tab is opened at the bottom of the screen. Unstaged Changes are shown here. Add needed changes to the index using Add Selected files to the index or Add all files to the index button (highlighted at the picture), input commit message and then Commit changes (Commit button or Ctrl+Enter). Commit appears at the History tab (Main menu: Window - Show view - Other - Version Control(Team.md) - History):

image

  • At the second step also could be used Commit and Push button. In case you need to Push changes, it could be done from Project context menu (Team - Remote - Push) or from History tab in case it is needed to push not all commits (right click at needed commit - Push commit). Changes should appear in your git repository.

More information could be found here

Pulling New Changes from Upstream Branch

Right-click on a project in the Project Tab and select Team - Pull or right-click on a repository in the Git Repositories view and select Pull to pull new changes from the upstream branch your local branch is tracking.

If you did no local change or want to discard your local changes, use Team - Reset