Skip to content

Instantly share code, notes, and snippets.

@AleBL
AleBL / semantic-commit-messages.md
Created September 14, 2020 12:14 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Using Key Prop with Fragments

import React from "react";
export default function App() {
  return (
    <div className="App">
      {[1, 2, 3].map(a => (
        <React.Fragment key={a}>{a}</React.Fragment>
      ))}
 
@AleBL
AleBL / create_git_hist.md
Last active July 25, 2020 14:41
Create Command Git Hist
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | 
  %C(bold red)%s %C(white)[%an]%C(reset) %C(blue)%d%C(reset)' --graph --date=short"

Code to add a new command in git config to format the git log and display a cleaner history sorted by date, will be displayed as follows:

  1. Commit Date [%ad]