0%

Git 基础操作手册

git 基础操作手册

# 用户信息
git config --global user.name "tttvin"
git config --global user.email "xxxxxx@qq.com"

# gitee
git config --global user.name "tttvin"
git config --global user.email "tttvin@qq.com"

# 创建本地ssh key
ssh-keygen -t rsa -C "tttvin@qq.com"

# 初始化仓库
git init

# 添加文件到暂存区
git add .

# 将暂存区内容添加到仓库中。
git commit
git commit -m fix
git commit -m "init"


# 关于每次push 都需要输入密码的问题
git config --global credential.helper store
git pull /git push (这里需要输入用户名和密码,以后就不用啦)

部署ssh公钥

ssh-keygen -t ed25519 -C "xxxxxxxx@qq.com"

cat ~/.ssh/id_ed25519.pub