One key trick to becoming a wizard developer
Why dig into problems that you could work around? Three reasons: one about my work, one about the team, and one about me.
Why dig into problems that you could work around? Three reasons: one about my work, one about the team, and one about me.
so I can find them here later: Fast-forward merge Some people like to git pull, but I never do. That brings new stuff from origin and then merges. I always do these do steps separately: git fetch and then either merge or rebase. The easy case, when I don’t have any local-only commits, is to …
Git tries to help translate line endings between operating systems with different standards. This gets sooo frustrating. Here’s what I always want: On Windows: git config –global core.autocrlf inputThis says, “If I commit a file with the wrong line endings, fix it before other people notice.” Otherwise, leave it alone. On Linux, Mac, etc: git …
*Update*: Deprecated. These days, to create a new Elm project, I use rug, as described in this post: http://jessitron.com/2016/12/using-rug-with-elm.html If you have tried Elm and want to make a client bigger than a sample app, this post can help you get set up. Here, find what goes into each of my Elm repositories and why. This template …
To quickly move to the root of the current git repository, I set up this alias: git config –global alias.home ‘rev-parse –show-toplevel’ Now, git home prints the full path to the root directory of the current project. To go there, type (Mac/Linux only) cd `git home` Notice the backticks. They’re not single quotes. This executes the command and then uses …
What can we learn about our projects with a little data science and a lot of version control?Locate the most dangerous code! Find where Conway’s Law is working against us! Know who to talk to about a change you want to make! See whether our architectural principles are crumbling! Adam Tornhill’s book shows both how …
When I first understood git, after dedicating some hours to watching a video and reading long articles, it was like I finally had power over time. I can find out who changed what, and when. I can move branches to point right where I want. I can rewrite history! Understanding a tool well enough that …
It’s time to clean out some old branches from the team’s git repository. In memory of them, I record useful tricks here. First, Sharon’s post talks about finding branches that are ripe for deletion, by detecting branches already merged. This post covers those, plus how to find out more about the others. This post is …
TL;DR – “git rm –cached ” means “Yo git, as far as you know, this file is gone” In a git repo, there are three places for files to be:1) In your working directory2) In the staging area3) In the most recent commit. Getting rid of a file means moving it out of all 3 …
TL;DR – it’s a good idea to throw experimental changes on a branch instead of stashing them. Today I stashed some changes, then popped them out, then decided they were a failure and wiped them out, then (later) wanted them back. git stash makes a commit, and commits are not deleted for thirty days, so …