git使用步骤
- 下载git
-
git config --global user.name "Your name"
git config --global user.email "Your email" - 在需要同步的根目录下
git init
远程仓库
- 创建SSH Key
ssh-keygen -t rsa -C "youremail@example.com" - 获取公钥,放进gitlab服务器
- 关联git服务器:
git remote add origin git@github.com:michaelliao/learngit.git - 推送到远程库:
git push -u origin master,首次使用时-u是为了关联远程库和本地的master










网友评论