合作联系微信: w6668263      合作联系电话:177-9238-7426     

git初始化

 

 初始化git仓库

git config --global user.name "Minglong"
git config --global user.email "ye583025823@126.com"

创建 git 仓库:

mkdir element-theme-blue1
cd element-theme-blue1
git init

git add .
git commit -m "first commit"
git remote add origin https://gitee.com/yeminglong/element-theme-blue.git
git push -u origin master

已有仓库?

cd existing_git_repo
git remote add origin https://gitee.com/yeminglong/element-theme-blue.git
git push -u origin master

 

 切换到分支

git创建分支并切换到当前新创建的分支上
git checkout -b dev
开发完成后
git push origin dev

 

报错 hint: Updates were rejected because the remote contains work that you do 解决方法

 

git pull origin master --allow-unrelated-histories

git pull origin 
git init

git remote add origin ssh://git@git.limikeji.com:10022/yanhui/webweb.git (可忽略)

git add .


git commit -m 'testst'


git push -u origin master

 

posted on 2021-09-17 15:25  草率的龙果果  阅读(58)  评论(0编辑  收藏  举报

导航