将SVN迁移到GIT,并将.svnignore文件迁移到.gitignore文件
我正在尝试将svn存储库迁移到git存储库。以下是我将遵循的步骤: 步骤1:使用以下方法收集svn作者信息:将SVN迁移到GIT,并将.svnignore文件迁移到.gitignore文件,git,svn,Git,Svn,我正在尝试将svn存储库迁移到git存储库。以下是我将遵循的步骤: 步骤1:使用以下方法收集svn作者信息: svn log -q http://localhost:8086/svn/project1/ | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt 步骤3:进入我的家庭临时目录: cd
svn log -q http://localhost:8086/svn/project1/ | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
步骤3:进入我的家庭临时目录:
cd ~/temp;
步骤4:为了验证本地和远程分支,我使用了以下命令:
$ git branch -a
* master
remotes/branch-A
remotes/tags/1.0
remotes/trunk
步骤5:为了实现正确的git标记约定,我使用以下脚本:
git for-each-ref refs/remotes/tags | cut -d / -f 4- | grep -v @ | while read tagname; do git tag "$tagname" "tags/$tagname"; git branch -r -d "tags/$tagname"; done
步骤6:要移动远程引用(如remotes/branch-A),我使用了以下脚本:
读取branchname时,每个参考/遥控器的gitcut-d/-f3-| grep-v@;执行git分支“$branchname”“refs/remotes/$branchname”;git branch-r-d“$branchname”;完成
步骤7:验证所有分支和标记:
$ git tag
1.0
$ git branch
master
trunk
步骤8:清洁我的主干分支:
$ git branch -d trunk
步骤9:创建名为Samsung的github存储库
步骤10:为我的本地git repo与远程repo的通信添加远程来源:
$git remote add origin https://github.com/tppalani/Samsung.git
步骤11:将所有标记和分支推送到github存储库:
$ git push --all
$ git push --tag
完成了!好的,当我记录我的GitHub存储库时,所有文件都有正确的数据,没有丢失
这是我的问题:
首先,我在gitHub存储库中有一个来自svn存储库的文件.svnignore。如何将此文件重命名为.gitignore
另外,我想将所有的.svnignore属性转移到.gitignore属性文件中。在推送所有分支和标记之前,如何执行此操作
谢谢。大家好,能不能请人帮忙?
$ git push --all
$ git push --tag