Git

序言

 

提交本地代码至远程git仓库

Create repository创建仓库

推送代码

git init

git add .

git commit -m '初始化'

git remote add origin https://github.com/664142818/umi-pms-master.git

git push -u origin master

遇到的问题及解决方式

fatal: refusing to merge unrelated histories(拒绝合并不相关的历史)

git pull origin master --allow-unrelated-histories

 

使用强制push的方法(多人协作会导致代码丢失不推荐)

git push -u origin master -f

git clone https://github.com/664142818/react-demos.git

 

拷贝忽略文件.gitattributes .gitignore

git remote rm origin

VScode

(Windows 上是 Alt + Shift + F)来对整个文档进行格式化

资料

Git版本控制 Git、github,gitlab相关操作

大道至简

https://www.cnblogs.com/AhuntSun-blog/p/12679145.html

posted @   ~沐风  阅读(182)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!

喜欢请打赏

扫描二维码打赏

了解更多

点击右上角即可分享
微信分享提示