电脑安装git客户端、注册github账号并登陆
到本地项目文件夹右键选择git bash here
输入个人信息(代码提交者)
git config --global user.name "xxxx" git config --global user.email xxxxx@qq.com
在本地项目目录创建本地仓库
git init
输入命令后项目目录会有一个隐藏的.git文件夹
上传所有代码到本地仓库
git add. (注意add后面有个点,与add之间有一空格)
这样就把代码上传到本地仓库了
git commit -m "initial commit"
在gitee上新建项目,复制https://gitee.com/xxx/xx.git地址
关联本地仓库并上传代码
git remote add origin https://github.com/Yanyf765/hr_sys.git(上步骤复制的地址) git push origin master
报错:
执行命令:
git pull origin master --allow-unrelated-histories
git 在pull或者合并分支的时候有时会遇到这个界面。可以不管(直接下面3,4步),如果要输入解释的话就需要:
1.按键盘字母 i 进入insert模式
2.修改最上面那行黄色合并信息,可以不修改
3.按键盘左上角"Esc"
4.输入":wq",注意是冒号+wq,按回车键即可
之后就可以成功的pull,push了
提交到远程报错,如下:
src refspec master does not match any
原因:
本地仓库为空
解决方法:
使用如下命令 添加文件;
$ git add add.php addok.php conn.php del.php edit.php editok.php ftpsql.sql index.php $ git commit -m "init files"
之后在push过程中出现如下错误:
$ git push -u origin master
Warning: Permanently added the RSA host key for IP address 'xx.xx.xxx.xxx' to the list of known hosts.
To git@github.com:hahaha/ftpmanage.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:hahahah/ftpmanage.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
提示使用 git pull 之后在 push
使用如下命令解决:
$ git pull --rebase origin master warning: no common commits remote: Counting objects: 3, done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done. From github.com:hahah/ftpmanage * branch master -> FETCH_HEAD * [new branch] master -> origin/master First, rewinding head to replay your work on top of it... Applying: init files
继续push,成功。
总结
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
- dnf110版本刃影装备搭配
- 短剧《跟着微短剧去旅行》开机仪式在贵阳举行
- 你要是哭的话我就不听你说了,本来就和我没关系。
- 【游新视界】《印蒂卡》试玩 修女与撒旦的送信之旅
- [ABC]纯音乐发烧试音碟《开盘母带试音极品(6N纯银版)》[WAV+CUE]
- [ABC]圣路易诹坊太古社《响鼓》[6N纯银镀膜][正版低速原抓WAV+CUE]
- [ABC]《当·威廉姆斯发烧精选[6N纯银镀膜]》[正版低速原抓WAV+CUE]
- 空包叫花鸡店主称临时工错拿样品:目前已停售
- 成绩出色!托比版《蜘蛛侠》三部曲重映票房320万美元
- 风水轮流转!《地狱潜者2》单日获近3万好评
- 新手入坑指南推荐,新手战力养成指南介绍
- 原画壁纸及美图第211期,无水印可自取
- 原画壁纸及美图第211期,无水印可自取
- 王中平.2006-平凡的幸福【麻辣唱片】【WAV+CUE】
- 金城武.1996-精选集Memories【EMI百代】【WAV+CUE】