Other articles


  1. MoveSVNToGit

    迁移SVN到Git

    1.创建用户映射

    检出svn上所有提交过代码的用户名

    svn log --xml | grep author | sort -u | perl -pe 's/.>(.?)<./$1 = /'
    

    显示

    <author>chenghu</author>
    

    然后将这些用户名复制下来

    修改成以下形式,保存成user.txt

    svn用户名 = git用户名 <git邮箱>
    

    chenghu = 小虎 <chenghu@chenghu.me>
    

    2.拉取SVN的commit纪录

    使用git-svn来拉取svn提交的记录,转换成git

    git svn clone https://SVNserver/serverpatch/trunk --authors-file=users.txt --no-metadata gitDir
    

    当然,如果svn上面提交记录比较多的情况下 ...

    read more

    There are comments.

  2. Git operation

    Git 操作

    最近使用git比较多,记录几个常见点git的相关操作

    1.遇到了一次代码冲突

    error: Your local changes to the following files would be overwritten by merge: projectpath/xxxxx.xcodeproj/project.pbxproj Please, commit your changes or stash them before you can merge.

    找了一下,说是代码冲突了,我的修改也不能忽略,那怎么搞

    git stash git pull git stash pop

    这样就保留了本地的修改,然后去处理冲突了

    2.放弃本地处理 ...

    read more

    There are comments.

blogroll

social