Skip to content

Instantly share code, notes, and snippets.

View benjaminlukeclark's full-sized avatar
:octocat:

Benjamin Clark benjaminlukeclark

:octocat:
View GitHub Profile
@luismts
luismts / GitCommitBestPractices.md
Last active May 13, 2024 03:07
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@alexpaul
alexpaul / Bash.md
Last active May 15, 2024 15:02
Creating a Bash Profile

Bash

What is a bash_profile

There is a hidden file in your Mac’s user directory named .bash_profile. This file is loaded before Terminal loads your shell environment and contains all the startup configuration and preferences for your command line interface. Within it you can change your terminal prompt, change the colors of text, add aliases to functions you use all the time, and so much more.

Creating a .bash_profile

If you run the open ~/.bash_profile command and do not have a current .bash_profile, follow these steps to create one:

  1. Open Terminal