1.从一提交基础上新建分支
git branch "branchname" "commit-sha1"
"commit-sha1"提交的sha1码
2.从一tag基础上新建分支
git branch "branchname" "tag_name"
3.更新服务器的tag
扫描二维码关注公众号,回复:
777299 查看本文章
git push --tag
4.git 上查看某文件的变化历史用
1.命令行下:gitk 文件路径名
2.在gitk上可以搜索变化的方法名
5.初始化服务器上git
git --bare init
6.在git project上添加远程服务器
git remote add origin [email protected]: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