Related Content
Getting Started With Git Bisect
Git bisect is a git command that makes it easier to track down where a problem was introduced to a codebase.
In large projects you may find that a change was added to the code that causes a problem and you then need to track down where that problem occurred. Knowing where the problem was introduced makes debugging the issue a lot easier.
Getting Started With Git
I have been using Git for a number of years and I can remember feeling quite daunted at the complexity of some of the commands I saw on the internet. When I started using Git on a daily basis I soon realised that the basics were quite simple and the complexity only lay further down the road with commands like cherry-pick or rebase.
Committing The Composer Vendor Directory
When installing composer dependencies those dependencies are downloaded and stored in the 'vendor' directory.
Tidying Up A Git Repo
Creating branches in git basically free and is easy to do. This has lead to the development of techniques like git flow and other branch related work streams, which are now commonplace in development.
Force Update Of Git Repository
If you have changed or updated a git repository and want to throw away your changes then a good way of forcing the latest changes to run a combination of two commands. The first command is git fetch --all, which tells git to download the latest updates from the remote without trying to merge or rebase anything.
Find The Number Of Commits In A Git Repository
Use the following command to find out how many commits there have been in a git repository. Not really useful in itself, but an interesting figure to see how active a project has been over it's lifetime.
git log --oneline --all | wc -l
The following git log flags are in use here:
Add new comment