Tag Archives: git

Publish .NET Nuget package from TeamCity to Azure DevOps

In the current project that I am working, I took the responsibility of upgrading some projects to .NET6. The company has its own Nuget package source. As a challenge for me to know how to build the upgraded libraries and push them to a Nuget source, I needed a locally running version of TeamCity.

Luckily it is not that hard to setup the docker container of TeamCity server. In addition I wanted to run a local git server. There is also a good solution for that and it is called Gitea. I almost have everything ! So I made a docker-compose file to share with you.

Continue reading

Add “git bash” to git menu in Visual Studio 219

Accessing git bash command prompt prior to Visual Studio 2019, was possible either through extensions or adding external tool.

I do not know exactly from which sub version of VS 2019 the “git” menu was added to it. It was something very on demand and a good decision made by VS team but if you go to the git > open in repository menu, it will run windows CMD by default.

I could not find a way to change that, how ever it is possible to define a custom menu and assign it to a command that runs the “git bash”.

First go to “Tools > External Tools ” and click on “Add’. Fill the form as below :

Now click on “Tools” menu, the new command is the first one above “External Tools”. If you have already another commands/Tools it might be in different position. This order is important when we are assigning the command to menu in next step.

Then Go to “Extensions > Customize Menu” and select “Commands” tab, from the “Menu bar” select “git” (you can put it every where you want.) and click on “Add Command”.

In the new dialog, from the right pane, select “Tools” and in the left pane select “External Command 1” (in case the order of the tool/command in “Tools” menu is different, pick another External Command)

Click on “Ok” and close the dialog.

Now if you open “Git” menu, you would see it there :

If you need to define a shortcut key for that, go to “Tools > Options > Environment” menu and select “Keyboard”. In the “Show commands containing” textbox, type “Tools.ExternalCommand1”, put the cursor in the “Press shortcut keys” and type the key combinations you want to run the “Git bash”. If that key is already reserved, the box “Shortcut currently used key” box will be filled. Otherwise you can press “Assign” and that is it.

More:

https://weblog.west-wind.com/posts/2015/jan/09/tip-create-a-visual-studio-menu-option-to-open-a-command-window

https://dev.to/jalalx/adding-git-bash-to-visual-studio-2019-no-extension-required-4478