文档日志
2021-07-16 创建文档
Git 初始化配置及ssh-key秘钥配置
- tags:文中以
${}
符号包围的都是需要替换成实际值得 - 未完待续 // TODO
一、Git 初始化配置
Git config 配置
Git global setup
git config --global user.name "${用户名}“
git config --global user.email "${邮箱}"
创建新项目仓库(Create a new repository)
git clone git@${domain}:${path}/${project_name}.git
cd ${项目所在目录project_located_dir}
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
已经存在项目目录(Existing folder)
cd existing_folder
git init
git remote add origin git@${domain}:${path}/${project_name}.git
git add .
git commit -m "Initial commit"
git push -u origin master
已经存在项目仓库(Existing Git repository)
cd existing_repo
git remote add origin git@${domain}:${path}/${project_name}.git
git push -u origin --all
git push -u origin --tags
二、SSH-KEY 配置
Create new key
ssh-keygen -t rsa -C "your.email@example.com" -b 4096
Existing a SSH-Key