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 "[email protected]"
Create a new repository
bash 复制代码
git clone [email protected]: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 [email protected]: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 [email protected]:workdemo/musicplayer.git
git push -u origin --all
git push -u origin --tags
相关推荐
大佬,救命!!!18 分钟前
git 常用操作整理
git·学习笔记
ashane13141 小时前
Redis的一些高级指令
redis·git·bootstrap
互联网搬砖老肖12 小时前
Git Fetch 和 Git Pull 的区别
git
涛ing12 小时前
【Git “fetch“ 命令详解】
linux·c语言·c++·人工智能·git·vscode·svn
ACGkaka_15 小时前
Git(八)如何在同一台电脑登录两个Git
git
漫天转悠18 小时前
本地Git仓库SSH同步到Gitee(码云)仓库的完整指南(附:SourceTree同步仓库)
git·gitee·ssh
一枚前端小姐姐19 小时前
git merge - 本地解决无权限dev分支的合并冲突
前端·git
froxy1 天前
Forking Workflow 详解
git
蜉蝣之翼❉1 天前
git 对比两种优化方法的性能
git
Archie_IT1 天前
5分钟搞定pichome本地部署方案并配置远程在线多端同步访问权限
网络·git·http·docker