diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js
index 8900c7c37811604b485eec0a4db59773451cdf70..c5c73b52a9b8d9cdf3999ee3b678280ba09ca782 100644
--- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js
+++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js
@@ -273,7 +273,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp
 			});
 		}.bind(this);
 		
-		this.createLinkDataSet = function(facade, path, gitCommitHash) {
+		this.createLinkDataSet = function(facade, path, gitCommitHash, gitRepositoryId) {
 			var c = this;
 			return c.createExperiment(facade).then(function(experimentPermId) {
 				return c.createFileExternalDms(facade).then(function(emdsPermId) {
@@ -287,6 +287,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp
 					cc.setExternalDmsId(emdsPermId);
 					cc.setPath(path);
 					cc.setGitCommitHash(gitCommitHash);
+					cc.setGitRepositoryId(gitRepositoryId);
 					linkedData.setContentCopies([cc]);
 					dataSet.setLinkedData(linkedData);
 					return facade.createDataSets([dataSet]).then(function(permIds) {
diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js
index 776d2a7063d1aa7795348e59720847d15f930277..a764ed31fb55d3b51537cddebb96fafc25b2af6b 100644
--- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js
+++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js
@@ -365,7 +365,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', '
 			var edmsId = null;
 			
 			var fCreate = function(facade) {
-				return c.createLinkDataSet(facade, "root/path", "my-hash").then(function(permId) {
+				return c.createLinkDataSet(facade, "root/path", "my-hash", "my-repository-id").then(function(permId) {
 					code = permId.getPermId();
 					return [ permId ];
 				});
@@ -380,6 +380,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', '
 					contentCopyCreation.setExternalDmsId(edmsId);
 					contentCopyCreation.setPath("my/data/path");
 					contentCopyCreation.setGitCommitHash("my-git-hash");
+					contentCopyCreation.setGitRepositoryId("my-git-repository-id");
 					contentCopyListUpdateValue.add([contentCopyCreation]);
 					contentCopyListUpdateValue.remove([contentCopy.getId()]);
 					
@@ -402,6 +403,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', '
 				c.assertEqual(contentCopies[0].getExternalCode(), null, "External code");
 				c.assertEqual(contentCopies[0].getPath(), "/my/data/path", "Path");
 				c.assertEqual(contentCopies[0].getGitCommitHash(), "my-git-hash", "Git commit hash");
+				c.assertEqual(contentCopies[0].getGitRepositoryId(), "my-git-repository-id", "Git repository id");
 			}
 			
 			testUpdate(c, fCreate, fUpdate, c.findDataSet, fCheck);
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/ContentCopy.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/ContentCopy.js
index 57fc016bc9e96564b15f13cde8f4c0cb8da5d5c9..c4f03d27d73b42154edfd28dc9160ce8530aed23 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/ContentCopy.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/ContentCopy.js
@@ -9,6 +9,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
 		prototype.externalCode = null;
 		prototype.path = null;
 		prototype.gitCommitHash = null;
+		prototype.gitRepositoryId = null;
 		
 		prototype.getId = function() {
 			return this.id;
@@ -40,6 +41,12 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
 		prototype.setGitCommitHash = function(gitCommitHash) {
 			this.gitCommitHash = gitCommitHash;
 		};
+		prototype.getGitRepositoryId = function() {
+			return this.gitRepositoryId;
+		};
+		prototype.setGitRepositoryId = function(gitRepositoryId) {
+			this.gitRepositoryId = gitRepositoryId;
+		};
 	}, {
 		id : "ContentCopyPermId",
 		externalDms : "ExternalDms"
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/create/ContentCopyCreation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/create/ContentCopyCreation.js
index 1f9c6db1a6d5f8c2a1c42125b2f6136773a74129..27a9e0f29397085557ff0b3301171c220fd86a54 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/create/ContentCopyCreation.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/create/ContentCopyCreation.js
@@ -7,6 +7,7 @@ define([ "stjs" ], function(stjs) {
     prototype.externalId = null;
     prototype.path = null;
     prototype.gitCommitHash = null;
+    prototype.gitRepositoryId = null;
     prototype.externalDmsId = null;
     
     prototype.getExternalId = function() {
@@ -27,6 +28,12 @@ define([ "stjs" ], function(stjs) {
     prototype.setGitCommitHash = function(gitCommitHash) {
       this.gitCommitHash = gitCommitHash;
     };
+    prototype.getGitRepositoryId = function() {
+      return this.gitRepositoryId;
+    };
+    prototype.setGitRepositoryId = function(gitRepositoryId) {
+      this.gitRepositoryId = gitRepositoryId;
+    };
     prototype.getExternalDmsId = function() {
       return this.externalDmsId;
     };
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ContentCopySearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ContentCopySearchCriteria.js
index 79d61a107f179fbf76d2c6bd78637bdc491f3751..50d265efb99e20d7bdb388f8800b79a05d40f4a1 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ContentCopySearchCriteria.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ContentCopySearchCriteria.js
@@ -2,7 +2,7 @@
  * @author anttil
  */
 define([ "require", "stjs", "as/dto/common/search/AbstractObjectSearchCriteria", "as/dto/dataset/search/ExternalDmsSearchCriteria", "as/dto/dataset/search/ExternalCodeSearchCriteria", "as/dto/dataset/search/PathSearchCriteria", "as/dto/dataset/search/GitCommitHashSearchCriteria",
-		"as/dto/common/search/AbstractCompositeSearchCriteria" ], function(require, stjs, AbstractObjectSearchCriteria) {
+	"as/dto/dataset/search/GitRepositoryIdSearchCriteria", "as/dto/common/search/AbstractCompositeSearchCriteria" ], function(require, stjs, AbstractObjectSearchCriteria) {
 	var ContentCopySearchCriteria = function() {
 		AbstractObjectSearchCriteria.call(this);
 	};
@@ -29,7 +29,12 @@ define([ "require", "stjs", "as/dto/common/search/AbstractObjectSearchCriteria",
 			var GitCommitHashSearchCriteria = require("as/dto/dataset/search/GitCommitHashSearchCriteria");
 			return this.addCriteria(new GitCommitHashSearchCriteria());
 		};
-		
+
+		prototype.withGitRepositoryId = function() {
+			var GitRepositoryIdSearchCriteria = require("as/dto/dataset/search/GitRepositoryIdSearchCriteria");
+			return this.addCriteria(new GitRepositoryIdSearchCriteria());
+		};
+
 	}, {
 		criteria : {
 			name : "Collection",
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/GitRepositoryIdSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/GitRepositoryIdSearchCriteria.js
new file mode 100644
index 0000000000000000000000000000000000000000..8dfdc6d093e59f9bead6924b3a5d7780c9acc35a
--- /dev/null
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/GitRepositoryIdSearchCriteria.js
@@ -0,0 +1,15 @@
+define([ "stjs", "as/dto/common/search/StringFieldSearchCriteria", "as/dto/common/search/SearchFieldType" ], function(stjs, StringFieldSearchCriteria, SearchFieldType) {
+	var GitRepositoryIdSearchCriteria = function() {
+		StringFieldSearchCriteria.call(this, "gitRepositoryId", SearchFieldType.ATTRIBUTE);
+	};
+	stjs.extend(GitRepositoryIdSearchCriteria, StringFieldSearchCriteria, [ StringFieldSearchCriteria ], function(constructor, prototype) {
+		prototype['@type'] = 'as.dto.dataset.search.GitRepositoryIdSearchCriteria';
+		constructor.serialVersionUID = 1;
+	}, {
+		fieldType : {
+			name : "Enum",
+			arguments : [ "SearchFieldType" ]
+		}
+	});
+	return GitRepositoryIdSearchCriteria;
+})
\ No newline at end of file