.gitignore not working

Monday, July 3, 2017

The Issue The .gitignore file is used to prevent Git to tracking certain files (namely ensure that certain files not tracked by Git remain untracked), for example test outputs, logs and build files. The best practice is to create this file when the repository is created, however in most cases, this file is created after detecting that unwanted files are being stored.   The Problem The files/folder that already are in the repository will not just delete themselves just because you added them to the gitignore file. Remember, the .gitignore file ignores only files that are not tracked.   The Solution To resolve the problem remove from...
no comments

Avoid Excessive Database Growth for Git-TFS Users

Monday, June 5, 2017

Let’s see some tips to avoid the excessive growth of the database if you are using Git in TFS...   Keep in mind that in Git-TFS there is not “git gc” implemented in the server side This means that once you push a change to the database it will remain in the database forever (yes, forever). The only way to remove it is to delete the whole repository Nevertheless this fact allows us to recover at any moment any thing that we have deleted (see how here)   Avoid to push the same...
no comments

Recovering Deleted Branches/Commits In Git-TFS

Monday, May 29, 2017

In Git TFS there is not “git gc” implemented in the server side. At first sight this can be a big problem because once you push a change to the database it will remain in the database forever (yes, forever). The only way to remove it is to delete the whole repository. Nevertheless this fact allows us to recover at any moment any thing that we have deleted. Let’s see how achieve this…   1) Get the Internal Repository ID: SELECT Name, InternalRepositoryId FROM .. ORDER BY InternalRepositoryId   2) Search the deleted branch in the reflog using the following query: SELECT DISTINCT...
no comments

Microsoft ALM User Group – Everything you wanted to know about Git

Sunday, March 19, 2017

Last Wednesday 15/03/17 I gave a talk about Git in Microsoft Raanana as part of the ALM User Group. People generally learn how to use Git but don’t really understand it so this time the idea was to answer the most frequently asked questions, give a couple of tips and explain Git from another point of view. Many thanks to all for coming and I hope you enjoyed it as much as I did. If you have any questions, you know how to contact me. See you next time, Leon Jalfon   PDF: EverythingYouWantedToKnowAboutGit.pdf  
no comments

Deploying Git Client-Side Hooks

Tuesday, January 24, 2017

First of all let’s define what Git hook is. Like a Git documentation explain Git hooks is a “way to fire off custom scripts when certain important actions occur”. There are two kinds of hooks: “client-side” and “server-side”. In this post we will talk about how we can deploy our client-side hooks in the simplest way possible.   When you think about client-side hooks there are two main issues to think about: 1) If a developer delete the repository and clone it again, how can he add the hooks again? 2) If a developer creates a new repository how can he add the...

Synchronizing TFS 2015 and VSTS with GitHub

Many times we have the need to store our project in GitHub because we want (or need) to be open source but still want to keep the capabilities offered by TFS/VSTS. Other times we need to give access to our repository to a person who can’t have (or that we don’t want to give) access to our TFS/VSTS server. In these cases we can resolve the problem synchronizing our TFS/VSTS repository with our GitHub (public or private) repository. At first glance it may sound like a complicated process but it’s easier than you expect. You can perform the synchronization manually (using pull/push)...