diff --git a/.dictionary.txt b/.dictionary.txt index c07d4875..9f0f8b25 100644 --- a/.dictionary.txt +++ b/.dictionary.txt @@ -10,10 +10,10 @@ booleanish bren bson cefc -chbb -chbf -chbh -chbr +chbfeat +chbfix +chbhotfix +chbrelease commitlintrc dawidd6 dedupe diff --git a/.github/.gitconfig b/.github/.gitconfig index bd0e7350..f11bc86d 100644 --- a/.github/.gitconfig +++ b/.github/.gitconfig @@ -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] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 260fd702..c4ee0893 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 git config --global user.name git config --global user.username