edit file: ~/.zshrc
add follow line:
export PATH="$PATH:[Path-to-git-simplifier-project]/bin"
in terminal, execute:
chmod +x [Path-to-git-simplifier-project]/bin
execute:
init-git-aliases.sh
Add [Path-to-git-simplifier-project]/bin in Windows environment Path
Open a terminal and execute:
init-git-aliases.sh
[alias]
fch = fetch --prune
co = checkout
cob = checkout -b
br = branch -vv
brd = branch -D
sts = status
lo = log --oneline
cim = !git add -A && git commit -m
amend = !git add -A && git commit --amend --no-edit
undo = reset --soft HEAD^
rh = reset --hard HEAD^
rb = rebase
rbi = rebase -i
rbc = rebase --continue
cp = cherry-pick
cpc = cherry-pick --continue
mg = merge
mgc = merge --continue
list of shortcuts to speed up and simplify certain Git actions :
-
glo: Git log oneline
-
gco: Moving to specified branch
-
gbr: Show locales branches
-
gbrd: Delete locales branches
-
gpl: Git pull
-
gcd: Move to develop branch, pull it and fecth
-
gcs: Move to staging branch, pull it and fecth
-
gcm: Move to main branch, pull it and fecth
-
gcp: Move to previous branch
-
grd: Rebase current branch from develop branch
-
grs: Rebase current branch from staging branch
-
grm: Rebase current branch from main branch
-
grbc: Continue current rebase
-
gcpc: Continue current cherry-pick
-
gmgc: Continue current merge
-
gp: Push current branch to remote (Create only)
-
gpf: Push force current branch to remote
-
ga: Amend commit of current branch
-
gap: Amend commit and push current branch
-
gapf: Amend commit and push force current branch
-
grfd: Rebase current branch from develop branch, after updating the develop branch
-
grfs: Rebase current branch from staging branch, after updating the staging branch
-
grfm: Rebase current branch from main branch, after updating the main branch
-
gitCleanBranch: Remove current local branch
-
gitCommit: Create a branch and commit with a workitem id source
-
gitDeleteLocalOrphanBranch: Remove local branches if they don't exist remotely
-
gitDeleteRemoteBranch: Remove remote branch
-
gitRenameBranch: Rename current or specified branch in local and remote
-
gcpbe: Cherry pick specified commit SHA to specified environnments
To use Azure functions you need to configure a SOPHT_AZURE_ACCESSTOKEN environnment variable.
This token must be have rights :
-
Code (Read, write & mange)
-
Connected server
-
Graph (Read)
-
Identity (Read)
-
Member Entitlement Management (Read)
-
Pull Request Threads (Read & write)
-
Work Items (Read, write & mange)
-
azureCreatePullRequest: Create a pull request from workitem