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 @ 2020-03-31 09:50  ~沐风  阅读(180)  评论(0编辑  收藏  举报