git 推送代码到远程仓库-操作

Git global setup (git 全局设置)

git config --global user.name "your-name"
git config --global user.email "yout-email "

Create a new repository(创建一个新的仓库)

git clone [email protected]:xxx/imageCache.git
cd imageCache
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

Push an existing folder(推送已经存在的文件夹)

cd existing_folder
git init
git remote add origin [email protected]:xxx/imageCache.git
git add .
git commit -m "Initial commit"
git push -u origin master

Push an existing Git repository()
 

cd existing_repo
git remote rename origin old-origin
git remote add origin [email protected]:xxx/imageCache.git
git push -u origin --all
git push -u origin --tags

生产秘钥:

ssh-keygen -t rsa -C "[email protected]

你可能感兴趣的:(git)