Skip to main content

Hello,

I’ve recently turned on Version Control a few days ago and just got around to setting up a Remote Repository (GitHub), I’ve just ‘pushed to remote’ for the first time, and I’ve noticed there are only 3 items on my GitHub repo, while I have 100+ workbenches uploaded.

I assume this has just uploaded items which have changed since I turned on Verion Control a few days ago. I was hoping enabling remote repo would push all of my workbenches to github. 

What is the best way to proceed? I want to get all of the items uploaded to my github repo, not just changes, so I have a backup of all of the items on Flow.

Thanks.

Did you add all your workspaces to the local repo before pushing to github?

From the command line, go to the folder with your workspaces and type

git ls-files

It will return a list of all files known to your git repository. If your workspaces aren’t listed, they aren’t managed by git, and you’ll have to add them to your repository first.

 


Hey Ecx,

It’s a common misconception to think that version control and the remote repository in FME Flow can be used like a regular Git workflow.

 

The Remote Repository in FME Flow is mainly intended as a backup mechanism. It stores the workspaces you’ve committed along with their version history, so you can preserve them during upgrades or migrations of FME Flow.

 

You won’t be able to interact with that remote repo directly. Only FME Flow itself should read from and write to it.

 

If your goal is to manage your workspaces with Git, I’d recommend setting up a separate Git workflow on your desktop environment, outside of FME Flow.


You can leverage the REST API to automate this,

  1. make a call to get all the repositories - /repositories
  2. make a call to get all the items in each repository - /repositories/{repository}/items

     

  3. Next we need to make a POST call to /versioncontrol/commits/{repository}/{item}. This API isn’t documented. You can inspect the network calls when clicking the commit button in the UI to see the full call It just requires an empty json upload body
  4. The local repository will now be up to date, and from here you can go and manually push to the remote repository.

You can leverage the REST API to automate this,

  1. make a call to get all the repositories - /repositories
  2. make a call to get all the items in each repository - /repositories/{repository}/items

     

  3. Next we need to make a POST call to /versioncontrol/commits/{repository}/{item}. This API isn’t documented. You can inspect the network calls when clicking the commit button in the UI to see the full call It just requires an empty json upload body
  4. The local repository will now be up to date, and from here you can go and manually push to the remote repository.


Thats exactly what I needed! Thank you!

The commit button under workspace you mentioned is also useful, to do it manually!