-
-
Save cybernetics/0fd08626be67498c6724ab53bc7f3ab2 to your computer and use it in GitHub Desktop.
Revisions
-
natescode revised this gist
Jul 12, 2022 . 1 changed file with 2 additions and 1 deletion.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 @@ -48,6 +48,7 @@ up = !git pull --rebase --prune $@ && git submodule update --init --recursive [push] default = current # automatically setup remote branch tracking without --set-upstream-branch autoSetupRemote = true [pull] default = current -
natescode revised this gist
Jul 12, 2022 . 1 changed file with 21 additions and 5 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 @@ -6,30 +6,46 @@ co = checkout cob = checkout -b feat = "!f(){ git cob feature/${1}; };f" # Return the default branch for the repo i.e. master or main default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' del = branch -D br-clean = "!f() { DEFAULT=$(git default); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; }; f" br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate save = !git add -A && git commit -m undo = reset HEAD~1 --mixed # Saves work in an unreachable commit, just in case, THEN WIPES it from existance wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard done = "!f() { DEFAULT=$(git default); git checkout ${1-$DEFAULT} && git up && git br-clean ${1-$DEFAULT}; }; f" # Pretty log logs = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 last = log -1 HEAD cm = commit -m ci = commit st = stash pop = stash pop apply = stash apply # get config info i.e. git conf user.name conf = config --global # quick work-in-progress commit wip = commit -am "WIP" # change commit message amend = commit -a --amend # Squash the last N commits. git squash 3, will reset the last 3 commits to the working directory then save them in a new commit squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" # unstage file(s) unstage = restore --staged ## sync current feature branch with origin/develop syncod = !git fetch --all && git merge origin/develop ## sync current feature branch with given origin branch sync = "!f(){ git fetch --all && git merge origin/${1}; };f" # checkout develop branch dev = !git checkout develop # checkout the default branch i.e. master or main ma = "!f() { DEFAULT=$(git default); git checkout ${1-$DEFAULT}; }; f" master = !git checkout master main = !git checkout main dev = !git checkout develop up = !git pull --rebase --prune $@ && git submodule update --init --recursive [push] default = current autoSetupRemote = true -
natescode revised this gist
Jun 23, 2022 . 1 changed file with 3 additions 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 @@ -31,4 +31,7 @@ main = !git checkout main rao = "!f(){ git remote add origin${1} && git push -u; };f" [push] default = current autoSetupRemote = true [pull] default = current -
natescode revised this gist
Jun 9, 2022 . 1 changed file with 1 addition and 1 deletion.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 @@ -2,7 +2,7 @@ email = your_email name = your_username [alias] s = status co = checkout cob = checkout -b feat = "!f(){ git cob feature/${1}; };f" -
natescode revised this gist
Jun 9, 2022 . 1 changed file with 2 additions 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 @@ -30,3 +30,5 @@ master = !git checkout master main = !git checkout main rao = "!f(){ git remote add origin${1} && git push -u; };f" [push] autoSetupRemote = true -
natescode revised this gist
May 26, 2022 . 1 changed file with 4 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 @@ -2,9 +2,10 @@ email = your_email name = your_username [alias] s = status~ co = checkout cob = checkout -b feat = "!f(){ git cob feature/${1}; };f" del = branch -D br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate save = !git add -A && git commit -m @@ -23,8 +24,9 @@ amend = commit -a --amend squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" unstage = restore --staged syncod = !git fetch --all && git merge origin/develop sync = "!f(){ git fetch --all && git merge origin/${1}; };f" dev = !git checkout develop master = !git checkout master main = !git checkout main rao = "!f(){ git remote add origin${1} && git push -u; };f" -
natescode revised this gist
Apr 15, 2022 . 1 changed file with 8 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 @@ -3,14 +3,14 @@ name = your_username [alias] s = status co = checkout cob = checkout -b del = branch -D br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate save = !git add -A && git commit -m undo = reset HEAD~1 --mixed wipe = !git reset --hard done = !git push origin HEAD logs = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 last = log -1 HEAD cm = commit -m -
natescode revised this gist
Apr 15, 2022 . No changes.There are no files selected for viewing
-
natescode revised this gist
Apr 15, 2022 . No changes.There are no files selected for viewing
-
natescode revised this gist
Apr 15, 2022 . 1 changed file with 1 addition and 1 deletion.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 @@ -23,7 +23,7 @@ amend = commit -a --amend squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" unstage = restore --staged synco = !git fetch --all && git merge sync = "!f(){ git fetch --all && git merge origin/${1}; };f" dev = !git checkout develop master = !git checkout master -
natescode created this gist
Apr 15, 2022 .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,30 @@ [user] email = your_email name = your_username [alias] s = status co = checkout cob = checkout -b del = branch -D br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate save = !git add -A && git commit -m undo = reset HEAD~1 --mixed wipe = !git reset --hard done = !git push origin HEAD logs = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 last = log -1 HEAD cm = commit -m ci = commit st = stash pop = stash pop apply = stash apply conf = config --global wip = commit -am "WIP" amend = commit -a --amend squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" unstage = restore --staged synco = !git fetch --all && git merge sync = "!f(){ git fetch --all && git merge origin/${1}; };f" dev = !git checkout develop master = !git checkout master main = !git checkout main