An easy way to add an alias is to run this single-line interface:
git config --global alias.repo-encrypt '!travis encrypt GITHUB_TOKEN=****secret**** --add'
Alternatively, you can run git config --global --edit to open the global Git configuration in a configured text editor (controlled by the core.editor Git configuration value). Then add the following to the file:
[alias] repo-encrypt = "!travis encrypt GITHUB_TOKEN=****secret**** --add"
After adding an alias, running git repo-encrypt will execute the Travis command. For future reference, starting with a Git alias with ! , it executes the command as if it were a regular shell, instead of simply adding an alias to the end of the git command, as usual.
See the Git page of the SCM book on aliases for more information.
Emily mabrey
source share