I want to
git push on Ubuntu via a single command, such as:
echo -e "email\ntoken" | git push origin branchName git push origin branchName && email && token
But after the command I have to put in my email:
You can provide the username once as part of the https git remote address.
git remote -vv to get the full, current remote URL.
Then to change your existing remote, you can do a command like:
git remote set-url origin https://[email protected]/yourname/yourrepo.git
where the new part is
[email protected] (substitute your github user name) and the rest of the URL should be the same as shown in
git remote -vv
Answered By – Dan Bonachea