> For the complete documentation index, see [llms.txt](https://docs.puppetry.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.puppetry.app/version-control.md).

# Version Control

Version control is a crucial part of development. Puppetry has an integrated [GIT client](https://git-scm.com/). Let's go together though a tutorial to examine how we can benefit of it.

## Working with Version History

First we take a look at how we can keep version history and navigate through it.

So we open a demo project and find **Project/Git** in the main menu.

![Git configuration](/files/-LuJ2F-dRSN_Js9U6xmo)

Here we provide test author name and email. This information will be used to sign project version.&#x20;

After saving the changes we go in the main menu and click on **File / GIT / Initialize**

![File / Git menu](/files/-LuJ2_hFrCSzc4u5zZhp)

We've just created a local GIT repository for our project. There will be kept snapshots of all the committed versions. Let's see how it works.

We open a suite and jump to **Targets**. We add anew target `TEST_SELECTOR` with value `.ver1`

![](/files/-LhtuembW7Gb_40Jc9m8)

Next in the main menu we click on **File / GIT / Commit**

It opens **New Commit** modal window:

![Committing ver 1 ](/files/-LhtvIFbH52v6sYav9qS)

We name the commit as **ver. 1** and click **Commit** button. Thus we get the first committed version.

Now we change the value of the target:

![](/files/-LhtvrrlMxxGiP6zBqPO)

Then we commit the change (**File / GIT / Commit**).

![Committing ver 2](/files/-Lhtw5a_XXXcGjpBr4ey)

Well, we have at least two versions of the project, so it makes some history.  Let's see what we really have. Click on  **File / GIT / Checkout**

It opens the following modal window:

![Project local history](/files/-LhtwtzUYGzdLVijxnxB)

Here we can see our previously committed changes.  Now we just to the **ver. 1** by clicking on **Checkout** link.

As we see `TEST_SELECTOR` has value `.ver1` of the previously saved version. As it says we are on a detached version. It's not the working one, so we can simply examine the contents and copy assets to paste into the head of history.

As we done we click on **Checkout master** button:&#x20;

![Checkout master button](/files/-Lhtxx78wpbwE282w2IG)

We've back to the working (last) version:

![](/files/-LhtybKD86BT0g81tD1D)

## Team Collaboration

Version control is especially good for collaboration. Let's imagine we have QA engineers Samwell Tarly and  Davos Seaworth. Sam is just committed a new version of the project and want to share it with Davos. For that guys need a remote repository. Let's take [Bitbucket](https://bitbucket.org) as service provider. So we register and create a new project:

![](/files/-LdyKf7-heeT5RF-CKK-)

That will bring us to the project page, which currently filled in with instruction to get started:

![Project page at Bitbucket](/files/-LhuT-iHOEg9MMEBaNO-)

Now we go back to Puppetry, open **Settings** application menu and jump to **GIT** tab. Next we scroll down to **Git Remote Repository** section:

![Configuring remote repository](/files/-LuJ3CCE1P4wQZOk46W7)

Here we need to provide the remote repository URL (from Bitbucket) and user credentials.  Now we can synchronize our local repository to the remote one. Click **File / GIT / Sync**&#x20;

It opens the following modal window:

![Sync with remote modal window](/files/-LuJ37HoEMu9m1ZUM5Km)

As we confirm the synchronization we can refresh the page on Bitbucket:

![Project artefacts on remote repository](/files/-LhuUqqScJ1f7SaeEf4n)

We can see that our project artifacts now are available there.&#x20;

Now Davos opens Puppetry on his machine and configure GIt:

![Davos' GIT configuration](/files/-LuJ3Hiv8LRN5HMq-B-c)

He opens **File / GIT / Clone** in the main menu and gets the following modal window:

![Clone Project modal window](/files/-LuJ3MXEy1Id-_v_nSKV)

As he selects a destination and clicks on Clone, the version of Sam's project gets delivered to Davos' Puppetry.&#x20;

Well, let's really collaborate. Davos changes the target again:

![](/files/-LhuVspeEbN0Qs7IKLvJ)

and commits the changes. Then he synchronizes with the remote repository (**File / Git / Sync with remote** ). Sam also synchronizes and sees the changes from Davos arrived:

![](/files/-LhuWODH266CgMUK--xS)
