
git
gyuei
专栏内容均为个人笔记
展开
-
Git命令问题:Your branch is up-to-date with ‘origin/master
参考网址:https://www.jianshu.com/p/7798186523ee所遇到的问题如下:Your branch is up-to-date with 'origin/master原因:版本分支的问题解决方法:新建一个分支git branch newbranch 检查分支是否创建成功git branch切换到你的新分支git checkout newbranch将改动提交到新分支上git add . git commit -m "提交"原创 2020-08-10 15:17:05 · 3383 阅读 · 0 评论 -
Git命令问题:fatal: Exiting because of unfinished merge
报错内容:error: You have not concluded your merge (MERGE_HEAD exists).hint: Please, commit your changes before merging.fatal: Exiting because of unfinished merge.解决方法(放弃本地修改):git reset --hard origin/master原创 2020-08-10 14:30:17 · 2668 阅读 · 0 评论 -
本地Git和GitHub建立联系(mac电脑)
一、安装好了 Git 之后,设置 GitHub 连接打开终端,切换到目标文件夹(如新建的git文件夹)输入命令git clone github目标存储库路径 (如:git clone https://github.com/user-guyue/hello-world)------将github的项目下载至本地首次使用时没有SSH目录,需要创建一个新的SSH KEY输入命令ssh-keygen -t rsa -C "github账号的邮箱"注意:1.注意C是大写的 2.记得输入你的github账原创 2020-08-07 14:24:15 · 469 阅读 · 0 评论 -
使用git将本地代码上传至github远程仓库
打开电脑终端,切换至项目文件夹输入命令 git add 文件名 //此操作是把新建的文件添加进来输入命令git commit -m "提交信息" //注:“提交信息”里面换成你需要的内容,如“first commit”输入命令git push -u origin master //此操作目的是把本地仓库push到github上面输入github的用户名和密码...原创 2020-08-07 15:07:03 · 295 阅读 · 0 评论 -
使用git将github远程仓库代码更新至本地
打开电脑终端,切换至目标文件夹查看当前状态,输入如下命令git status将远程仓库的代码更新至本地,输入以下命令git pull原创 2020-08-10 14:10:57 · 461 阅读 · 0 评论 -
Git命令问题:Found a swap file by the name “.git/.MERGE_MSG.swp”
当用git命令拉取最新代码时,遇到如下问题Found a swap file by the name “.git/.MERGE_MSG.swp”解决方法:输入命令rm -rf .MERGE_MSG.swp—删除这个文件即可原创 2020-08-10 14:05:14 · 5552 阅读 · 0 评论