Last active
February 17, 2023 13:49
-
-
Save cloud-walker/d1ea925dc24f0901a135c1ffeac5f028 to your computer and use it in GitHub Desktop.
Revisions
-
cloud-walker revised this gist
Feb 17, 2023 . 2 changed files with 54 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ ## Base configuration Global for me: add them on `~/.gitconfig` ``` [[filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [init] defaultBranch = main [pull] ff = only [rerere] enabled = true [alias] s = status -s lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit unstage = reset HEAD -- ua = unstage pushf = push --force-with-lease pullr = pull --rebase amend = commit --amend --no-edit df = diff --ignore-space-at-eol -b -w --ignore-blank-lines last = log -l HEAD branch-name = rev-parse --abbrev-ref HEAD publish = !git push -u origin $(git branch-name) unpublish = !git push origin :$(git branch-name) a = add ap = add -p c = commit --verbose ca = commit -a --verbose cm = commit -m cam = commit -a -m m = commit --amend --verbose # list branches sorted by last modified b = "!git for-each-ref --sort='-authordate' --format='%(refname)' refs/heads | sed -e 's-refs/heads/--'" # list aliases la = "!git config -l | grep alias | cut -c 7-" new = checkout -b # branch delete: This checks out your local master branch and deletes all local branches # that have already been merged to master brd = !sh -c \"git checkout main && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d\" # branch delete here: Deletes all local branches that have already been merged to the branch # that you're currently on brdhere = !sh -c \"git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d\" ``` -
cloud-walker revised this gist
Jul 24, 2022 . 1 changed file with 0 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,11 +12,3 @@ Global for me: add them on `~/.gitconfig` unpublish = !git push origin :$(git branch-name) ``` -
cloud-walker renamed this gist
Apr 19, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cloud-walker revised this gist
Apr 19, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ `rm -rf .git/rr-cache` to **completely** remove the `git rerere` cache -
cloud-walker revised this gist
Apr 19, 2017 . No changes.There are no files selected for viewing
-
cloud-walker revised this gist
Mar 24, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## Base configuration Global for me: add them on `~/.gitconfig` ``` @@ -12,7 +12,7 @@ Global for me: add them on `~/.gitconfig` unpublish = !git push origin :$(git branch-name) ``` ## Spawn Env management to be added on the `.git/config` file per project ``` -
cloud-walker revised this gist
Mar 24, 2017 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,13 +3,13 @@ Global for me: add them on `~/.gitconfig` ``` [alias] s = status -s unstage = reset HEAD -- last = log -l HEAD lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit branch-name = rev-parse --abbrev-ref HEAD publish = !git push -u origin $(git branch-name) unpublish = !git push origin :$(git branch-name) ``` # Spawn Env management ( -
cloud-walker created this gist
Mar 24, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # Base configuration Global for me: add them on `~/.gitconfig` ``` [alias] s = status -s unstage = reset HEAD -- last = log -l HEAD lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit branch-name = rev-parse --abbrev-ref HEAD publish = !git push -u origin $(git branch-name) unpublish = !git push origin :$(git branch-name) ``` # Spawn Env management ( to be added on the `.git/config` file per project ``` [alias] spawn-publish = "!f() { readonly BRANCH=$(git branch-name) && git checkout -b \"${BRANCH}_spawn_env\" && git publish && git checkout $BRANCH; }; f" spawn-update = "!f() { readonly BRANCH=$(git branch-name) && git checkout \"${BRANCH}_spawn_env\" && git rebase $BRANCH && git push -f && git checkout $BRANCH; }; f" ```