2

There are similar questions to this but they mostly have some other purpose than mine, use different tools or end up not being that similar.

I've been searching for another way to source control Dynamics NAV development, as we've been using an in-house add-on called Object Control which merely controls changes to objects and produces .txt backups.

With those .txt backups we could do normal source control using Visual Studio Team Services, but we want to avoid the hassle of opening Visual Studio just to connect it all to Team Services everytime we make changes.

I know Microsoft has a set of REST APIs for retrieving information on repos and projects but i'm not sure how you can send information to the server (new changesets, files, creating projects, etc) without using an IDE.

I'm set on creating an application or interface to bridge the gap between the NAV development and Team Services but is there a way to use and communicate with Team Services on its own?

sonicadv27
  • 41
  • 7

3 Answers3

2

Yes, you can use the git command line to source control VSTS git repo. You can use git bash (download here).

Frequently commands as below:

git clone <URL of VSTS git repo>    #clone a git repo of a VSTS project locally 
git add filename                    #add the file in git repo
git commit –am 'message'            #commit the changes with comment: message
git push                            #push current branch to remote (VSTS git repo)

More git commands, you can refer git book.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
1
  1. Power Tools. It integrates with windows shell and you can do everything w/o opening VS
  2. DLLs that installed along with VS TFS can be used like any other libraries in your application. Or you could even use then in Nav RTC. I used this approach have some inconsistencies but in general it works smoothly. So you can sourcecontrol Nav from Nav itself.
  3. Rest services since you mentioned them. I'm just not sure if they provide access to work items only or to source control as well. For you to explore.
Mak Sim
  • 2,148
  • 19
  • 30
0

If you chose Git for source control, you just need the command line to commit changes and push them to VSTS. In VSTS go to Code -> Manage Repositories -> New repostiroy. Choose Git as the type and give it a name. On the top right of the new repository home screen you'll find a button "Clone", copy the URL for the next step.

On your machine install Git then open a command prompt and navigate to the folder with your source code and type

git init
git add .
git commit -m "Initial Commit"
git push --set-upstream <the URL you took from VSTS> master
Frederic
  • 633
  • 5
  • 12