If you are not using GIT, you are missing out

The numbers represent in the respective order:Number of untracked files/foldersNumber of changes in tracked filesNumber of files to be deletedThose are the commands for committing:This is how it looks like when executed on the command line:Git commit — Posh git resultJust a few details do add:After you add, the number of changes now is green, meaning they are staged and will be included in the next commit.After the commit, the branch name is now green, meaning it has commits to be pushed for the remote.blue branch name = Aligned with remotered branch name = Behind remote (means you need to get the latest)yellow = Conflict between local and remote, you probably screwed up =bUndo pending changes — Git resetWho never messed up in before committing and want to undo all changes?BranchingBranching on git is quite straight forward:MergingLet’s suppose you started developing against the “new-branch”, but someone just applied new changes against master and you need them?Solving conflictsConflicts happen way less them in TFS, as Git tracks the changes line by line instead of the whole file, but they do happen..The easiest way to solve conflicts I found is relying on visual studio IDE..As soon as your branch starts with conflicts, just navigate to team explorer > pending changes > click on the conflicts, and you can solve them exactly the same way as TFS, with visual studio showing the exact merges.Git trickWhen you give a “git push”, the default behaviour is to push all local branches that are being tracked to the remote server, this can cause confusion and troubles..You can change to push only the current one you are working with:Pull requests[Details here]Team Explorer for everything!Many .net developers use the Team Explorer to do all their operations with Git, I would advise against it, I myself committed things to master by mistake because the UI is not clear..And over the years I saw many developer issues, people losing all their day work.Learn the command line and the good practices for committing and integrating early.ConclusionAs spoken, Git has a series of advantages over TFS, I hope this guide will save time from developers used to TFS on transitioning, as I had to pay the high price of committing uncountable mistakes.. More details

Leave a Reply