Skip to content

Instantly share code, notes, and snippets.

@AliciaMoses
AliciaMoses / auto-resolve-git-conflict.txt
Last active February 12, 2025 21:32
FAO ADAM - FIX THIS MESS Auto resolve merge conflicts - current first
while ! git rebase --continue; do
git diff --name-only --diff-filter=U | while read file; do
# Apply 'ours' (current changes from HEAD) first
git checkout --ours "$file"
# Then apply 'theirs' (incoming changes)
git checkout --theirs "$file"
@AliciaMoses
AliciaMoses / main.css
Created December 30, 2024 01:18
Minimal dark-mode gist styling
.gist-meta {
display: none;
}
@media (prefers-color-scheme: dark) {
.gist {
filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.2);
}
}
@AliciaMoses
AliciaMoses / .zshrc
Last active August 22, 2024 21:12
fzf + `git checkout`
function gxo() {
local branches branch
branches=$(git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)') || return
# Add a separator and then list all branches
branches="$branches"$'\n'"$(git branch --all | grep -v '\->' | sed 's/^[* ]*//')" || return
# Use fzf to select a branch + added useless but cool looking graph
branch=$(echo "$branches" | fzf --height 40% --border --preview 'git log --oneline --graph --decorate --color=always {}') || return
@AliciaMoses
AliciaMoses / launch.json
Created July 17, 2024 19:10
VSCode Pytest + Django Launch Config
{
"version": "0.2.0",
"configurations": [
{
"name": "Test Current File",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"${file}",
@AliciaMoses
AliciaMoses / settings.json
Created July 17, 2024 19:00
VSCode Theme - settings for editor and workbench appearance only
{
//_____DEBUGGING
"debug.console.fontFamily": "'jetbrains mono', monospace",
"debug.console.fontSize": 14,
//_____TERMINAL
"terminal.explorerKind": "both",
"terminal.integrated.enableMultiLinePasteWarning": "auto",
"terminal.integrated.fontFamily": "'jetbrains mono', monospace",

Building Git Workflows

We'll now experiment with various commands which form a basic workflow

✨ Making changes and staging them

After each step view the status with git status

# 1. create a file with content 

Git workshop - Local Code-along

1. Let's set up our project and create a new repository

cd projects 
mkdir git-internals
cd git-internals

git init
class Foo:
a = 1
class Bar(Foo):
b = 2
class Baz(Foo):
c = 3