git 空项目初次提交项目命令记录

Command line instructions

You can also upload existing files from your computer using the instructions below.

Git global setup
bash 复制代码
git config --global user.name "demo"
git config --global user.email "demo@qq.com"
Create a new repository
bash 复制代码
git clone git@gitlab.xxx.com:workdemo/musicplayer.git
cd musicplayer
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
bash 复制代码
cd existing_folder
git init
git remote add origin git@gitlab.xxx.com:workdemo/musicplayer.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
bash 复制代码
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.xxx.com:workdemo/musicplayer.git
git push -u origin --all
git push -u origin --tags
相关推荐
nightunderblackcat10 小时前
新手向:Git下载全攻略
git
若无_15 小时前
了解 .husky:前端项目中的 Git Hooks 工具
前端·git
想当花匠的小码农15 小时前
Git 仓库“减肥”指南:从检测、清理到同步的全流程实践
git
R_.L19 小时前
Git : 基本操作
git
python_1361 天前
git常见冲突场景及解决办法
git
洛小豆2 天前
Git 打标签完全指南:从本地创建到远端推送
前端·git·github
王道长服务器 | 亚马逊云2 天前
一个迁移案例:从传统 IDC 到 AWS 的真实对比
java·spring boot·git·云计算·github·dubbo·aws
嘟嘟可在哪里。2 天前
IntelliJ IDEA git凭据帮助程序
java·git·intellij-idea
xiaok2 天前
分支管理提交代码
git·gitlab·github