git使用命令总结

文章目录

Git 复制

css 复制代码
git clone  -b RobotModelSetting/develop https://gitlab.123/PROJECT/123.git

创建提交步骤

Git 全局设置:

css 复制代码
git config --global user.name "jiyuchen"
git config --global user.email "674680916@qq.com"

创建 git 仓库:

css 复制代码
mkdir boxcutter-gui
cd boxcutter-gui
git init 
touch README.md
git add README.md
Code
git remote add origin https://gitee.com/jiyuchen/boxcutter-gui.git
git push -u origin "master"

已有仓库?

css 复制代码
cd existing_git_repo
git remote add origin https://gitee.com/jiyuchen/boxcutter-gui.git
git push -u origin "master"

遇到问题解决办法:

问题一

先git pull一下,具体流程为以下几步:

css 复制代码
$ git pull origin 远程分支名
$ git push origin 远程分支名

详细步骤

css 复制代码
1、右击git项目(里面添加.git文件夹) git bash here
在每次 push 代码之前先把服务器上最新的代码 pull 到本地。
2、git pull origin master --allow-unrelated-histories
3、git pull origin master
4、git init
5、git remote rm origin(如果没有这一步直接下一步会提示错误fatal: remote origin already exists.)
6、git remote add origin  (https地址)
7、git add .
8、git commit -m 'testst'
9、git push -u origin master
相关推荐
极光技术熊11 小时前
Spring AI 从入门到精通:构建你的 AI 开发知识体系
后端·github
用户394839510755312 小时前
怎么让我的 Agent 真正"懂"我?——关于记忆、经验学习与预测的一些真实体验
github
远航_18 小时前
git submodule
前端·后端·github
fthux20 小时前
如果你用 Mac,那你可能需要 Noti Shift
macos·开源·github
程序员天天困1 天前
Loop Engineering 实战:/goal 命令让 AI 自己写完整项目
github
徐小夕2 天前
我们开源了一款“框架无关”的思维导图编辑器,3分钟集成到任意系统
前端·javascript·github
小爷毛毛_卓寿杰2 天前
我把 397B 的「Agentic 大脑」塞进了 Xinference,一键部署 Nex-N2
人工智能·架构·github
小爷毛毛_卓寿杰2 天前
我把一个 3B 模型塞进了 Xinference,然后它干掉了 DeepSeek V3.2
人工智能·开源·github
凌奕2 天前
别用文档约束你的 Agent:聊聊 Agent 开发流程的思想
llm·github·agent
和你看星星2 天前
Git rerere:让重复冲突只解决一次
git