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
相关推荐
南_山无梅落35 分钟前
Git 结合 Gitee 使用教程:从入门到实战
git·gitee
这就是佬们吗36 分钟前
Windows 的 CMD 网络环境:解决终端无法联网与更新的终极指南
java·windows·git·python·spring·maven
醇氧9 小时前
【git】WARNING: connection is not using a post-quantum key exchange algorithm.
git
一只程序熊10 小时前
Git不常用操作记录
git
小龙11 小时前
【Git 报错解决】 远程仓库 origin 已存在(`remote origin already exists`)
git·报错
BORN(^-^)19 小时前
Git 操作概要
git
bigHead-21 小时前
Git合并操作详解:安全高效地合并远程分支
git·安全·elasticsearch
C_心欲无痕1 天前
ts - 交叉类型
前端·git·typescript
秋饼1 天前
【K8S测试程序--git地址】
git·容器·kubernetes
小龙1 天前
【Git 报错解决】本地无有效提交无法推送(`src refspec main does not match any`)
git·github·报错