git简单命令

简易的命令行入门教程:

Git 全局设置:

git config --global user.name "yyyyjinying"

git config --global user.email "12343343@qq.com"

创建 git 仓库:

mkdir wx-project

cd wx-project

git init

touch README.md

git add README.md

git commit -m "first commit"

git remote add origin https://gitee.com/yyyyjinying/wx-project.git

git push -u origin "master"

已有仓库

cd existing_git_repo

git remote add origin https://gitee.com/yyyyjinying/wx-project.git

git push -u origin "master"

问题

commit or discard the untracked or modified content in submodules)

状态解读:在当前文件夹内部存在其它的.git文件

解决办法:找到其它的.git文件,删除后重新 add commit

因为之前的项目有.git,后面又提交到新的仓库,出现了子模块,所有需要将多余的.git文件删除,ls -a && rm -rf .git

相关推荐
像风一样的男人@2 小时前
warning: could not find UI helper ‘git-credential-manager-ui‘
git·ui
代钦塔拉4 小时前
Git & GitHub 从入门到精通:全流程实战教程
git·github
晚风吹红霞5 小时前
Linux下的趣味编程 —— 进度条、Git版本控制与GDB调试实战
linux·运维·git
xlq223225 小时前
7.git
git
Ws_5 小时前
Git + Gerrit 第六课:commit --amend、Patch Set 与 Change-Id
git
AIMath~1 天前
向github中上传文件过大超过50M怎么办
网络·git·github
AIMath~1 天前
如何将一个新的文件夹使用git 工具提交到github新仓库中
git·github
满天星83035771 天前
【Git】原理及使用(二) (版本回退)
linux·git
愿天垂怜1 天前
【C++脚手架】ffmpeg 库的介绍与使用
linux·服务器·开发语言·c++·ide·git·ffmpeg
月夜的风吹雨1 天前
Linux 基础开发工具详解:从 yum 到 gdb 实战指南
linux·git·ubuntu·centos·vim