
git
小小的木头人
这个作者很懒,什么都没留下…
展开
-
git出现Your branch and ‘origin/master‘ have diverged
如果不需要保留本地的修改,只要执行下面两步:git fetch origingit reset --hard origin/master当我们在本地提交到远程仓库的时候,如果遇到上述问题,我们可以首先使用如下命令:git rebase origin/master然后使用git pull --rebase最后使用git push origin master把内容提交到远程仓库上。...原创 2021-09-10 17:44:59 · 702 阅读 · 0 评论 -
Your branch and ‘origin/master‘ have diverged,
问题:On branch masterYour branch and 'origin/master' have diverged,and have 4 and 10 different commits each, respectively. (use "git pull" to merge the remote branch into yours)nothing to commit, working tree clean如果不需要保留本地的修改,执行下面两步:git fetch origi原创 2021-07-15 16:28:02 · 798 阅读 · 0 评论 -
git错误 Please specify which branch you want to merge with 的解决办法
git pull出现下图报错:用git branch 查看一下:当前位置在(HEAD detached at 26af3ce)进行如下操作:git branch temp 26af3cegit checkout mastergit merge temp查看下当前分支git branch最后删除temp分支git branch -d temp...原创 2020-12-07 10:08:39 · 5925 阅读 · 2 评论 -
git pull : error: Your local changes to the following files would be overwritten by merge:
首先3步git stash git pull origin master git stash pop接着#查看状态git status如果有冲突的文件会显示出来,提示:需要git add [files]进入 【files】文件路径修改对应冲突后,git add [path]/files原创 2020-09-28 14:05:06 · 415 阅读 · 0 评论 -
gitlab 搭建
1)创建 docker-compose.yml 内容:web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'git.usooft.com' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://git.usooft.com' ports: - '8084:80' - '8083:443' - '802原创 2020-06-05 17:18:19 · 340 阅读 · 0 评论 -
git乌龟-推送代码到服务器上
git 推送:1.本机window系统的话先下载msysgit下载后在开始菜单里面找到 "Git --> Git Bash"进入命令2、找到要上传的目录,通过命令 git init 把这个目录变成git可以管理的仓库git init3、把文件添加到版本库中,使用命令 git add .添加到暂存区里面去,不要忘记后面的小数点“.”,意为添加文件夹下的所有文件g...原创 2020-03-20 09:43:38 · 1110 阅读 · 0 评论 -
Git 命令
分支操作git branch 创建分支git branch -b 创建并切换到新建的分支上git checkout 切换分支git branch 查看分支列表git branch -v 查看所有分支的最后一次操作git branch -vv 查看当前分支git brabch -b 分支名 origin/分支名 创建远程分支到本地git branch --merged...原创 2020-03-20 09:37:03 · 291 阅读 · 0 评论 -
git源码安装 Centons7
下载地址:https://www.kernel.org/pub/software/scm/git/ 下载 git-2.9.5.tar.gz1、解压tar xzf git-2.9.5.tar.gz2、设置安装前缀cd git-2.9.5 configure --prefix=/usr/local/git -with-tcltk3、安装安装依赖:yum install...原创 2019-10-10 09:39:46 · 323 阅读 · 0 评论