Typically, we share repositories through a Git host, like GitHub, allowing others to clone the repository to get a copy. But sometimes that’s not an option, for example when trying to get someone started on your project when corporate onboarding processes take days to grant GitHub access.| adamj.eu
If you make a mistake whilst rebasing, it might seem hard to undo. But with git reflog, you can find the original commit SHA and revert back to it. Let’s see how with an example.| adamj.eu
Have you ever accidentally committed a bunch of junk created by your OS, like Thumbs.db files from Windows, or .DS_Store files from macOS? Or, have you joined a project, and for one of your first commits, added rules to the .gitignore file for your text editor’s project files? If so, this post is for you! You can avoid such pain or busywork by making a global ignore file.| adamj.eu
By default, if you mistype a Git command, it will list similar commands that you might have meant:| adamj.eu
Many Git commands output “advice”, with hints about which commands you could run next. Most notably, git status gives you advice for what to do about files in each state:| adamj.eu
I have just released an update to my book Boost Your Git DX, six months after its initial release. This update adds some extra content and has a bunch of edits based on reader feedback. The PDF is now ten pages longer, for a total of 363.| adamj.eu
Contrary to common belief, Git doesn’t store diffs. It actually stores snapshots of whole files, heavily compressed to reduce redundancy. Then when displaying a diff is required, git diff generates it on the fly.| adamj.eu