Our hero is called “ bisect” because it carries out a binary tree search. It simply finds the particular commit that introduced the error. The good news is that Git offers a great debugging tool for this specific situation: Git bisect. Your next option is probably a tedious debugging process, dealing with tons of code that may not even be related to the problem. To make the situation even worse, the most popular commit message is “fix” and you can’t even identify which files were changed in repository. Furthermore, after a brief investigation you are sure that none of the related code in your repository has been changed so that isn’t the cause of the malfunction. Once in a while, you will find yourself in an annoying situation when one of the features in your app no longer works. Git diff –cached compares a file in the index with the local repository 1. Git diff HEAD compares a file in the working directory with the local repository Git diff compares a file in the working directory with the index Git diff –cached compares the index with the local repository - all changes between last commit and next commit Git diff HEAD compares the working directory with the local repository - all changes since last commit Git diff compares the working directory with the index - all unstaged changes I’ve made a list of 5 Git commands that are real life savers and I hope that some of them will help you to save your precious time when you’re managing your code in a Git repository. I spent too much time trying to fix up failed merges, checking a list of parameters for some Git commands over and over again, and in long debug sessions that would be a lot easier and shorter with Git. ![]() ![]() This is a common problem - a lack of detailed knowledge of how a solution can be used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |