Global setup:
Download and install Git
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Add your public key
Next steps:
mkdir test
cd test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:tester/test.git
git push origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@github.com:tester/test.git
git push origin master
Download and install Git
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Add your public key
Next steps:
mkdir test
cd test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:tester/test.git
git push origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@github.com:tester/test.git
git push origin master
转载于:https://blog.51cto.com/liushen/160423