GIT Aliases
You can set aliases for your commonly used git commands e.g. git config --global alias.co checkout
.
Or a more advanced example with push options for GitLab where we will create Merge Request and assign it to user:
git config --global alias.mr "push -u origin HEAD -o merge_request.create -o merge_request.target=master -o merge_request.remove_source_branch -o merge_request.assign=user"
Adjust the user with the username of a user to which you want to assign MR. Another one that will add all files, amend last commit and push:
git config --global alias.acp "!git add . && git commit --amend --no-edit && git push --force-with-lease"
- Previous: Docker troubleshooting Windows Server error
- Next: GIT Amend last commit