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
相关推荐
qq_377572771 小时前
git commit - revert + reset + checkout + reorder
git
2301_767233227 小时前
Git使用和理解上的一些问题
git
nyf_unknown15 小时前
(vue)将文件夹打成tar包, Git Bash(推荐)具体使用
vue.js·git·bash
兔老大RabbitMQ16 小时前
Git Revert 特定文件/路径的方法
git
星哥说事1 天前
如何将堡塔云WAF迁移到新的服务器
服务器·git·github
阿政一号1 天前
Git版本控制器
git
妮妮喔妮2 天前
SSH协议的GIT转换
运维·git·ssh
今禾2 天前
Git 日常使用与面试考点详解:从入门到精通
前端·git·面试
Data_Adventure2 天前
能连上 GitHub(SSH 验证成功),却 push 失败?常见原因与逐步解决方案
前端·git·github
间彧2 天前
如何解决Git客户端下载缓慢问题
git