GIT
2024-02-26 17:08:29 0 举报
AI智能生成
登录查看完整内容
为你推荐
查看更多
git命令
作者其他创作
大纲/内容
git branch 分支
git checkout -b 分支名
创建远程分支
git checkout -b X origin/X
创建分支
git checkout 分支名
切换分支
git branch -a
查看分支
删除未合并的分支
git branch -D 分支名
删除已经合并的分支
git branch -d 分支名
删除分支
git branch --set-upstream X origin/X
关联远程分支
git merge
合并分支
git fetch
更新远程库信息
git pull
更新分支
git push
git push origin 分支名
推送分支
git remote
git remote -v
查看远程仓库
4. 分支管理
git stash
暂存未提交内容
仅恢复
git stash apply
先恢复,后删除
git stash pop
恢复暂存内容
git stash drop
删除暂存内容
5.暂存区
git tag
git tag -r
查看标签
git tag 标签名
git tag 标签名 commitId
添加tag
git tag -d 标签名
git push origin -d 标签名
删除tag
git push origin 标签名
git push origin --tags
推送tag
git pull origin --tags
更新到本地
6.标签
git config --global user.name \"name\"
git config --global user.email \"email\"
git config user.name \"name\"
git config user.email \"email\"
0.配置
git init
git clone(推荐)
1.创建
填写message
保存
git commit
git commit -m \"message\"
提交文件
git status
git diff
git log
git log --pretty=oneline
git reflog
查看状态
git reset --hard commitId
将暂存区的文件撤销到工作区
git reset HEAD 文件
回退
2.提交
git add 指定文件
git add .
.gitignore中指定的文件被忽略
2.添加文件
git rm 文件名
删除版本库,不删除本地文件
git rm --cached 文件名
6.删除文件
git mv
7.重命名
3.文件管理
GIT
0 条评论
回复 删除
下一页