1.从一提交基础上新建分支
git branch "branchname" "commit-sha1"
"commit-sha1"提交的sha1码
2.从一tag基础上新建分支
git branch "branchname" "tag_name"
3.更新服务器的tag
git push --tag
4.git 上查看某文件的变化历史用
1.命令行下:gitk 文件路径名
2.在gitk上可以搜索变化的方法名
5.初始化服务器上git
git --bare init
6.在git project上添加远程服务器
git remote add origin git@github.com:caius/foo.git
7.svn转git
git svn init svn_url #svn_url为svn地址
git svn fetch #拿下代码
git gc #垃圾回收
8.默认push当前分支
git config --global push.default current
本文介绍了如何使用Git进行分支管理、服务器更新、项目初始化及版本迁移等操作,涵盖了从单一提交或标签创建分支、更新远程tag到svn项目的迁移等多个方面。
165

被折叠的 条评论
为什么被折叠?



