##Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:alexpchin/<reponame>.git
git push -u origin master
##Push an existing repository from the command line
git remote add origin [email protected]:alexpchin/<reponame>.git
git push -u origin master
@Amruth-Smaragdine
" curl -u USERNAME:PERSONAL_ACCESS_TOKEN https://api.github.com/user/repos -d '{"name":"myDirName"}' #this will create the repo in github.
This last command will save your Personal Access Token or password in your Bash history. If I find a way to prevent this I will update this comment."
The way to keep the PAC key from bash history is to use one space in front of any command.
If you want to delete the last history line manually use:
history -d $(($HISTCMD - 2)); history -w;
Or find the line number and use:
history -d <line number>; history -w;