shortlr
Just this command will push to your origin master and will shorten the url of your remote.
chmod u+x shortlr
- Copy the executable to your bin folder
Now you can use it globally
shortlr -l 'url'
If the argument is a URL, the output a shortened URL.
shortlr -l http://google.com
will produces a short link pointing to google.
shortlr 'remote-name' 'branch-name' 'directory' 'custom-code'
All the arguments are optional.
Argument | Default Value | Comments |
---|---|---|
remote-name | origin | The remote to which the git push takes place |
branch-name | master | The branch to which git push takes place |
directory | The directory to which the shortcode will point, If no value is provided, shortcode points to the root of the repo. | |
custom-shortcode | The custom shortcode that will be produced. Makes sense only if you know the secret. If no value is provided, a random shortcode is generated |
shortlr origin master public_static projPs
This will push your code to 'origin master' and produce a link like http://cb.lk/projPs This short link is pointing to public_static directory of your repository.
shortlr -s 'remote-name'
'remote-name' is an optional argument
Argument | Default Value | Comments |
---|---|---|
remote-name | origin | The remote of which you want the short link of |
shortlr -s origin
Produces a short link of 'origin' remote of your repository