Is there a suggested .gitignore to use with UIPath Studio?

I’m working on implementing GIT integeration with Team Foundation Server and noticed that it seems a number of files are constantly changing that don’t seem to have anything to do with the actual code. I suspect that there are files that should be excluded from the repository but I’m not sure all of the details. Does anyone have or know of a suggested .gitignore to use?

Thanks in advance!

3 Likes

@tristaanogre
have a look here:

Not exactly helpful. I know what a .gitignore file is and what it does. What I don’t know is if there is a recommended .gitignore to use with UIPath.

1 Like

EDIT: Discussion goes further on and a list of recommended settings will be discussed

Hoping for some visibility on this post, I have actually been wondering this for some time as well. As an example, simply opening a project results on all these “changes” in the screenshot below appear, sometimes more or less.
When running on debug mode I also notice settings configuration files appearing.

As annoying as the dependencies file updating when I open, of course would not be safe to ignore this. The second one nuget.props updates the machine name and hash code I believe. Unsure if safe to ignore, anyone know?

image

Again… that’s not the question. I know it works… but what should be included? How should it be formatted? Is there a sample .gitignore to use?

4 Likes

Ok. Thanks for your feedback
Updated:

  • about objects was mentioned below
  • it is recommended to block the .settings for the checkin and let stay them individually on the

In newer package version UiPath. System.Activities 2020.XX - 2021.4.XX a revision of the set is to recommend but still will have the strategy for not mixing up machine individually values

Hi @tristaanogre I have tried a fair bit of stuff now, and finally settled in this gitignore file for our team, at least for the time being. This .local folder causes a lot of trouble when collaborating with team members, so we deleted it from git as we had some commits causing issues. Once purged and properly ignored, it stops detecting a change when simply opening the project. Additionally, check out the git ignore file suggested by the Enhanced REF, although I see no added value to my daily use. My version ignores where the packages are cached location, which is different for every machine of course.

*PackageCache.json
*ProjectSettings.json
*.cache
*.props
*.backup
*AllDependencies.json
2 Likes

Thanks, efluerent. Currently, I have the .local and .settings folders, both, set in my .gitignore and that seems to be doing what I want.

1 Like

Thanks for the solution ! :slight_smile:

However, it would be great if it was existing a suggested .gitignore as reference to use with UiPath Studio!

1 Like

Coming back to contribute an improved version that ignores the objects folder that came with UI Automation Package that just came out. This new version of gitignore also takes care of what I previously stated, it just does it in a cleaner fashion :slight_smile:

I can only attach a ZIP version, but below is the text for reference as well
git ignore.zip (147 Bytes)

.settings/
.local/
.objects/
3 Likes

there’s also a pending commit to the github-templates of gitignores.
feel free to contribute there or even better if you an, merge the pending request.

@efleurent, I’d be careful with the ‘.objects/’ line as this appears to be part of the new UI/Object browser functionality in UiPath Studio. From what I can tell, it tracks the usage of applications and screens from the ‘UI Objects browser’ within your project. You can add some applications/screens and see how items are added within the .objects folder in the project path.

The ‘.settings/’ line is also something to be cautious with if working with more than a single developer. It is best if the team/developers run the same (or at least similar) debug settings and definitely the same production settings. This folder stores the global project configuration settings for defaults when running in debug or run mode.

However, including .local is great, that’s where I’ve seen the most merge conflicts so good idea to include it. :slight_smile:

UI Objects Browser screenshot for referece:

Thank you for your feedback! .tmh and .objects is something we don’t plan on using until it has stabilized and becomes a bit more useful. I could also see the argument for keeping .settings but I find this more cumbersome when testing, as any changes could trigger a tracked git change and that just kind of gets in the way :smiley:

So how are we supposed to handle sharing our Object Repository on Git, if the .objects folder is needed, but not feasible for versioning?

Every time I open my UI project in UI Path, changes are made to the (now shared on Git) .objects folder!?

@UiPathMaster @balupad14

2 Likes

Here is my .gitignore file

##################################
### UiPath Ignore Folders      ###
##################################
## Ignore .objects folder
## Ignore .local folder
## Ignore .settings folder
## Ignore .tmh folder

.local
.local/*
/.local
/.local/*
.settings
.settings/*
/.settings
/.settings/*
.objects
.objects/*
/.objects
/.objects/*
.tmh
.tmh/*
/.tmh
/.tmh/*
~*

##################################
### OTHER IDE and TEMP files   ###
##################################

##################################
### Using https://gitignore.io ###
##################################

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide


### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn.  Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PhpStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
5 Likes

Thank you for sharing!

I use the following (added .local after reading this topic :))

/.local/
/Exceptions_Screenshots/
/Data/Input/
/Data/Output/
/Data/Temp/
/.screenshots/