2月 182017
 

Update .gitmodules with the path to the new repository
Remove the corresponding line from the “.git/config” file
Delete the corresponding directory in the “.git/modules/external” directory
Delete the checked out submodule directory itself (unsure if this is necessary)
Run git submodule init and git submodule update
Make sure the checked out submodule is at the correct commit, and commit that, since it’s likely that the hash will be different
After doing all that, everything is in the state I would expect.

  发表于 13:16  Tagged with:
7月 052014
 

Git是目前最流行的版本管理系统,学会Git几乎成了开发者的必备技能。

Git有很多优势,其中之一就是远程操作非常简便。本文详细介绍5个Git命令,它们的概念和用法,理解了这些内容,你就会完全掌握Git远程操作。

  • git clone
  • git remote
  • git fetch
  • git pull
  • git push

本文针对初级用户,从最简单的讲起,但是需要读者对Git的基本用法有所了解。同时,本文覆盖了上面5个命令的几乎所有的常用用法,所以对于熟练用户也有参考价值。 Continue reading »

  发表于 11:12  Tagged with:
4月 232014
 

同事在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息:

error: Your local changes to 'c/environ.c' would be overwritten by merge.  Aborting.
Please, commit your changes or stash them before you can merge.

这个意思是说更新下来的内容和本地修改的内容有冲突,先提交你的改变或者先将本地修改暂时存储起来。

处理的方式非常简单,主要是使用git stash命令进行处理,分成以下几个步骤进行处理。 Continue reading »

  发表于 00:16  Tagged with: