From the RFC 1738:
"...Only alphanumerics [0-9a-zA-Z], the special characters
"$-_.+!*'()," [not including the quotes - ed], and reserved characters
used for their reserved purposes may be used unencoded within a URL."
So you have to URL encode the @ character:
git push https://username:password%40@github.com/username/test.git
However, this is extremely unsafe. Not only URL are clearly readable in HTTP traffic, but they are being cached by hosts, logged by loggers, and stored in many ways by proxies and routers along the path to the destination.
Why do you ever need a password if it is failing its purpose to provide authentication? Don't use a password if you don't need to authenticate.
Furthermore, providing password in URL is being deprecated by browser, read for example http://support2.microsoft.com/default.aspx?scid=kb;[LN];834489
There are several more secure ways to perform one-step push without having to type in your password, for example using SSH keys or git config credential.helper