Skip to content

Commit

Permalink
chore: update sample gitconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Aug 25, 2022
1 parent 20ee547 commit 246a401
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ booleanish
bren
bson
cefc
chbb
chbf
chbh
chbr
chbfeat
chbfix
chbhotfix
chbrelease
commitlintrc
dawidd6
dedupe
Expand Down
45 changes: 15 additions & 30 deletions .github/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,54 @@
# aliases - basic helpers
[alias]
# add and commit
ac = "!f() { git add .; git cm \"$@\"; }; f"
ac = "!f() { git add . && git cm \"$@\"; }; f"

# add new remote
ar = "!f() { git remote add \"$0\" \"$1\"; }; f"

# git branch
b = "!f() { git branch $@; }; f"

# delete branch locally
bdel = "!f() { git b -d $@; }; f"
bdel = "!f() { git branch -d $@; }; f"

# delete branch remotely
bdelr = "!f() { git push origin --no-verify --delete $@; }; f"

# rename branch
bren = "!f() { git b -m $@; git puo $@; }; f"

# checkout branch
ch = "!f() { git checkout $@; }; f"
bren = "!f() { git branch -m $@ && git pou $@; }; f"

# checkout and push new branch to origin
chb = "!f() { git ch -b \"$@\"; git puo \"$@\"; }; f"
chb = "!f() { git checkout -b \"$@\" && git pou \"$@\"; }; f"

# checkout branch and pull latest version
chp = "!f() { git ch $@; git pull; }; f"
chp = "!f() { git checkout $@ && git pull; }; f"

# commit with message
cm = "!f() { git commit -s -m \"$@\"; }; f"

# perform initial commit and push to branch main
launch = "!f() { git chore \"first commit\"; git b -m main; git rao $1; git puo main; }; f"

# create new local repo, perform initial commit, and push to branch main
launchwithinit = "!f() { git init; git chore \"first commit\"; git b -m main; git rao $1; git puo main; }; f"

# tell git to start tracking branch and push to origin
puo = "!f() { git push origin --no-verify -u $@; }; f"

# add new remote origin
rao = "!f() { git remote add origin $@; }; f"

# rebase branch
rb = "!f() { git rebase $@; }; f"
pou = "!f() { git push origin --no-verify -u $@; }; f"

# remove local .git directory
restart = "!f() { rm -rf .git; echo \"removed .git directory.\"; }; f"

# create new local repo and perform initial commit
setup = "!f() { git init && git config branch.autosetuprebase always && git config core.ignorecase false && git config pull.rebase true && git config rebase.autoStash true && git ac \"initial commit\"; }; f"

# undo last commit
ulc = "!f() { git reset head~1 --soft; }; f"

# aliases - branch naming conventions
[alias]
# create new feature branch and push upstream
chbfeat = "!f() { git chb feat/$@; }; f"

# create new bugfix (feature) branch and push upstream
chbb = "!f() { git chb feat/fix/$@; }; f"
chbfix = "!f() { git chb feat/fix/$@; }; f"

# create new hotfix branch and push upstream
chbh = "!f() { git chb hotfix/$@; }; f"

# create new feature branch and push upstream
chbf = "!f() { git chb feat/$@; }; f"
chbhotfix = "!f() { git chb hotfix/$@; }; f"

# create new release branch and push upstream
chbr = "!f() { git chb release/$@; }; f"
chbrelease = "!f() { git chb release/$@; }; f"

# aliases - husky
[alias]
Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ Follow the steps below to setup your local development environment:
5. Update `~/.gitconfig`

```sh
git config --global color.ui true
git config --global commit.gpgsign true
git config --global core.ignorecase false
git config --global pull.rebase true
git config --global user.email <email>
git config --global user.name <name>
git config --global user.username <username>
Expand Down

0 comments on commit 246a401

Please sign in to comment.