• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Twitter GitHub
You are here: Home / Archives for Dev Tips

Dev Tips

Building blocks representing two Git branches, one with a merge commit where the top commit has two parents.

Git Merge Commit with Blocks

Last updated on February 21, 2021 by Sal Ferrarello

We can’t do a fast-forward merge when the most recent commit on the receiving branch does not appear in the branch we are merging in. One of our options in this situation is to create a merge commit when we merge in our branch.

Filed Under: Dev Tips, Programming Tagged With: Git

Should I add .env to .gitignore?

Last updated on February 11, 2021 by Sal Ferrarello

The short answer is, “yes”. You should use your .gitignore file to ignore the .env file.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

.gitignore Hidden Files with Exceptions

Last updated on February 13, 2021 by Sal Ferrarello

In most operating systems by default, files that start with a period (.) are hidden. When setting up my .gitignore file, I like to ignore all these hidden files (with a few exceptions).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

Starter .gitignore file

Last updated on February 11, 2021 by Sal Ferrarello

This is my general starter .gitignore file for projects. I have a separate .gitignore for WordPress websites.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git, gitignore

git add -p

Last updated on February 13, 2021 by Sal Ferrarello

By using “git add -p”, I can include some of my current changes in my commit (without including all of my changes).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: Git

What is a Git Branch?

Last updated on February 7, 2021 by Sal Ferrarello

While my mental model visualizes a Git branch as a stack of building blocks, in actuality a Git branch is a pointer to a single commit. Under the hood Git stores a text file for each branch and in the text file is a single line, which is the commit hash indicating the commit at the tip of that branch.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: Git

Writing Good Commit Messages is the Wrong Place to Start

Last updated on February 6, 2021 by Sal Ferrarello

I’m a big fan of Git and I’ve worked with lost of developers in growing their Git skills. Often developers learning Git, start by learning how to write a “good” commit message. While writing “good” commit messages is an important skill, in my opinion it is the wrong place to start.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Recommendations Tagged With: Git

Rules for Writing Git Commit Messages

Last updated on February 7, 2021 by Sal Ferrarello

These are the rules I follow when writing Git commit messages. I’ve found these serve me well and are compatible with most projects I work on (if a project has a specific set of rules for writing Git commit messages, those would override any rules I’ve outlined here).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Recommendations Tagged With: Git

Resolving Git Rebase Merge Conflicts

Last updated on February 2, 2021 by Sal Ferrarello

When performing a Git rebase, I often find myself in the situation where I have one or more merge conflicts. This is how I resolve these merge conflicts.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Git, Merge Conflict, rebase

Building blocks representing two Git branches with the commit on one branch removed as happens in a rebase.

Git Rebase with Blocks

Last updated on February 21, 2021 by Sal Ferrarello

We can’t do a fast-forward merge when the most recent commit on the receiving branch does not appear in the branch we are merging in. One of our options in this situation is to rebase the branch we want to merge in.

Filed Under: Dev Tips, Programming Tagged With: Git, rebase

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 16
  • Next Page»

Copyright © 2021 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in