Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
digitaljhelms / gist:4287848
Last active July 25, 2024 08:06
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@louim
louim / uploads.yml
Last active December 23, 2022 14:20
Drop-in playbook for Trellis to push and pull uploads from the server to your local machine.
---
- name: Sync uploads between environments
hosts: web
remote_user: "{{ web_user }}"
vars:
project: "{{ wordpress_sites[site] }}"
project_root: "{{ www_root }}/{{ site }}"
tasks:
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active July 5, 2024 06:54
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@CodeShane
CodeShane / jqcheatsheet.md
Last active November 22, 2018 21:44 — forked from talwrii/jqcheatsheet.md
jq cheatsheet

jq cheatsheet

Extract field from list of objects

jq 'map(.foo)'

[ { foo: 1 }, { foo: 2 } ]
[1, 2]
@robatwilliams
robatwilliams / useful-names.md
Last active March 29, 2023 12:32
List of names that tend to be useful in programming

Useful names

List of names that tend to be useful in programming. On their own, or for building names.

A thesaurus is also useful.

Things

  • action, operation
  • attribute, property
  • buffer, queue