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
相关推荐
lpfasd12312 小时前
git-团队协作基础
chrome·git·elasticsearch
John Song14 小时前
git多个账号管理
git·github
CV_J14 小时前
解决Git 冲突后本地提交丢失/未推送问题
git
__Witheart__15 小时前
Git 某个分支恢复到某个特定的 commit 状态
git
XU磊26016 小时前
Git 实现github仓库管理-删除指定目录下的所有文件并保留目录结构
git·github
zhimingwen18 小时前
解决 GitLab Token 轮换后 SourceTree 认证失败问题
git
昵称是6硬币19 小时前
代码管理——VS Code|Git
git·代码管理
Trouville0119 小时前
如何在VScode环境下使用git进行版本控制,并上传到gitee远程仓库
ide·git·vscode
weixin_4233919320 小时前
从开发到合并:AICR 项目 Git 协作提交全流程指南
git
paishishaba1 天前
Git常用命令大全及提交推送详解
git