PandHedge

Git基础

2025-09-13
PandHedge

GIt

vs code 下载 Git

绑定用户信息

git config –global user.name “用户名”

git config –global user.email “邮箱”

克隆仓库

git clone <address>

初始化仓库

git init

文件添加到暂存区

git add git add .

提交

git commit -m “”

日志

git log

–stat 提交中修改的文件

git diff 查看具体节点修改内容

回溯

git reset –hard

git checkout

分支

git branch 查看分支

git checkout 切换分支

git checkout -b develop 创建新分支

git merge 合并分支

绑定远程仓库

git remote add <远程仓库名称> <远程仓库地址>

上传与下载

git push <远程仓库名> <本地分支名>:<远程分支名> 上传

git pull <仓库名> <分支名> 下载

SSH验证

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

找到public key save address ,复制public key内容,添加到账户中SSH密钥

image-20250724162053758


上一篇 Excel基础

下一篇 HTML

Comments

Content