Git从远程仓库中删除文件,并上传新文件

目录

删除:

拉取远程分支的更新:

​编辑

首先查看git状态:

​编辑

删除文件并提交版本库:

提交:

上传新文件:

首先查看git状态:

提交到暂存区:

提交到版本库:

上传:

​编辑


删除:

拉取远程分支的更新:

git pull origin main

首先查看git状态:

git status

删除文件并提交版本库:

git rm example/Makefile example/testserver.cc

git commit -m "Delete test"

提交:

git push origin main

上传新文件:

首先查看git状态:

git status

提交到暂存区:

git add example/

提交到版本库:

git commit -m "EchoServer test"

上传:

git push origin main

相关推荐
zzzzls~6 小时前
Vibe Coding 最佳实践:Claude Code 检查点回溯与 Git 自动存档每轮对话
git·ai·claude·vibe coding·checkpointing
ssshooter8 小时前
彻底搞懂 SSH 与 Git 的“幕后交易”
git·github·全栈
Asurplus12 小时前
Centos7安装Git环境
git·centos·yum·dnf
m0_7431251313 小时前
claude --version 报错Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win).
开发语言·git·bash
AntoineGriezmann13 小时前
Git:新建功能分支并解决 Merge 冲突
git
Sylus_sui15 小时前
Git快速创建并推送新分支
git
悠悠子衿1213816 小时前
Claude+VSCODE配置git导致频繁弹出git bash 的CMO窗口解决方法
ide·git·vscode
QC七哥17 小时前
伪造git提交记录生成点阵字符
git·github
HilariousDog18 小时前
git仓库中克隆文件同时保存line history / 行提交历史的方法介绍
git
TimberWill18 小时前
GitHub Copilot 一键生成中文commit提示语规则设置
git·github