LMLPHP后院

GITHUB之GIT BASH使用教程

g deltas: 100% (102/102), done.Checking connectivity... done.C:\Users\May\Documents\GitHub\test>git branchgit branch 命令用于创建分支,查看分支。查看分支可以使用参数-a,-v,-r等,a代表所有,v代表版本信息,r 代表显示远程分支。下面的例子使用“git branch develop”创建了...

解决GIT本地的远程分支删不掉的问题

分享一个 GIT 使用实际遇到的问题。问题描述,使用 git branch -av 查看分支,可以看到 origin/ 下面有某个分支,使用 git branch -d 或者 git branch -D 删除提示分支不存在。本地远程分支删不掉的原因,系远程分支已经被其他终端删除,本地更新后 packed-refs 已经被删除,导致 git branch -d 报找不到分支的错误,需要手动清理 .git/ref...

关于 GIT 使用的几个常用命令

介绍几个 GIT 很实用的命令,一般人不容易掌握哦。如何检出一个远程分支,并且要求检出的分支名称和它不同,怎么做?git checkout -b <branch> --track <remote>/<branch> // $ git checkout -b tmp --track origin/feature-20170918如何删除一个本地的远程分支?git branch -d -r <remote>/<b...

使用GIT BASH管理多个远程代码库

Y-PC ~/Documents $ cd GitHub/LMLPHP/ May@MAY-PC ~/Documents/GitHub/LMLPHP (develop) $ git status On branch develop Your branch is up-to-date with 'origin/develop'. nothing to commit, working directory clean...

在云主机或VPS上搭建私有的GIT仓库

ux 都自带了,只是版本低了一点,没有关系。$ git init --bare lmlphp.com hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use i...

GIT之filter-branch修改作者信息

figured user.email, you can make a correction, before publishing the project, like this: git filter-branch --env-filter ' if test "$GIT_AUTHOR_EMAIL" = "root@localhost" then GIT_AUTHOR_EMAIL=john@example.co...

Git更新master分支冲突解决及cherry-pick使用

前一阵子,开发的时候发现主分支不能更新,运维大哥,憋了一个大招,提供了几个命令,解决了一番。如下命令: git reset origin/master git reset --hard git clean -fd 造成上面的原因大概就是 master 分支出问题之后,强制更新导致本地和服务器不一样导致。上面的命令请谨慎使用,会删除目录下没有添加到 git 仓库的其他代码,本人也是经历过一次血的教训。 开发过...

谈谈项目开发过程中GIT合并分支

团队项目开发过程中,如果 GIT 的使用不统一,不规范,或者某些成员对 GIT 的操作不太熟悉,导致分支的合并特别混乱,使用 --graph 参数查看或者后期代码审查都是非常不友好的。我曾经到过的一家公司,强制所有的合并都使用 pull request,并且强制所有的 pull request 都必须 rebase 成一个 commit。现在想想,觉得他们很傻,真的很傻,如果一个公司对于技术只有偏执,没有一个...

git pull 误操作后如何恢复

ature-20170415@{4}: commit: . 44102be feature-20170415@{5}: commit: . 723f02a feature-20170415@{6}: branch: Created from HEAD 查看 reflog,然后选择恢复的点:$ git reset --hard feature-20170415@{1} ...
2024-03-29 15:04:08 1711695848 0.024222