You can't do this when you're downloading via the web interface unless you use your browser's Save As functionality.
However, if you're downloading with curl
from the command line, you can use the -o
option to specify a file name that you'd like to use to save the file. For example, if I wanted to download the latest Git LFS Windows installer to foo.exe
, I could do this:
$ curl -L -o foo.exe \
https://github.com/git-lfs/git-lfs/releases/download/v2.13.3/git-lfs-windows-v2.13.3.exe
You can also write a small shell function to extract the tag from the URL (say, with sed's s
command) and then use that to name the file. For example, with the Git LFS file I mentioned above, you could do something like this:
download () {
url="$1"
version=$(echo "$1" | sed -e 's!^.*/\(v[0-9]*\.[0-9\]*\.[0-9]*\)/.*$!\1!')
curl -L -o foo-$version.exe "$url"
}
Since you haven't linked to the repository from which you're trying to download, I can't provide an example that will work with that specific repository, but you can make appropriate adjustments to suit your situation.