How to call "git pull" through rest api in TFS? - tfs

I have been working on TFS for last couple days and I tried to implement "git pull" through rest api.
I followed Rest api Doc
https://www.visualstudio.com/en-us/docs/integrate/api/git/overview
The documentation has "Create,Delete,View" functionalities.
I am not sure, how to pull the git repo using TFS rest api.
Please give me some suggestions or blogs to resolve this.
Thanks in advance :)

Invoke git.exe as a process or use client library like libgit2 or libgit2sharp.
TFS/VSTS implements standard Git HTTP protocol (see Smart HTTP) so there is no need for a special custom API for standard Git operations.

Related

What is difference between Github Project and Git from Source Code Management?

What is difference between Github Project and Git from Source Code Management in Jenkins?
Github is dedicated to using github services and it unlocks specific github features.
The other will work with any git SCM server including external vendors (github, bitbucket, your own infrastructure , team foundations server etc) . This means it will support only git standard features, nothing that is vendor specific.
You can configure both without problem.
If you install bitbucket plugin, you will have a similar third section.

Ready API (v2.4) integration with TFS for code repo

I am very new to API automation through ready API , I want to store all my code on TFS but ,I couldn't find any doc or video as to how to do it , although there are many docs and sources available as to how to do it on git HUB but not on TFS, Need your help on same
I am currently using Ready API 2.4 version and TFS 2017
Request you to guide me on this
Found this official doc: Git Integration, which guides you to store tests and test projects in source control, so you could store all code on TFS by connecting to Remote TFS 2017 Repository and clone it.

TortoiseHG clone Issue

I tried multiple times to clone my project but every time I received NOT FOUND ERROR: 255
Please review the attached screenshot. Thanks you
Isnt TortoiseHG a Mercurial client. And you should not write git clone in the address field and most likely even not https.
Bitbucket stopped serving Mercurial projects, now it's only git.
I think you should try using Bitbucket's own git client.

How to use gerrit notedb,I want to query some comment record in db

After I upgrade gerrit version from v2.15 to v3.0,I can not use gsql command to access my db.I know v3.0 use notedb as db,and i also read NoteDB.pdf from website.Does somebody tell me how to access notedb
You don't have an easy way to do that because all the data is embedded in the Git repository.
See more info about this here.
For example, you can see some info about change 56266 if you go to the specific Git repository in the Gerrit server (GERRIT-SITE/git/repo-full-path.git) and execute the following command:
git log refs/changes/66/56266/meta

Importing BitBucket git repository to Team Foundation Server 2018

When I create a new Git repository in a TFS project area, there are several options to add some code.
I’ve tried the import a repository a couple of times now.
The first run gave me this error after an extended period of time. This would indicate a connection timeout based on my experience with other tools and process.
We checked the logs in the EventViewer on the application server side but couldnt find anything. We suspect an SSL/cert issue between BitBucket and TFS 2018. This is also hosted in-house.
Please double check whether the URL is correct. And please notice import service relies on basic authentication to communicate with the source repository. If the username / password you are using are not basic auth then authentication will fail and import will fail. One way to check if the username / password you are using are basic auth or not is to try using Git to clone your repository using the below format:
git clone https://<<username>>:<<password>>#<<remaining clone Url>>
Please refer to the following link for more details:
https://learn.microsoft.com/en-us/vsts/git/import-git-repository?view=vsts#frequently-asked-questions

Resources