前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >从svn迁移git别扯了蛋

从svn迁移git别扯了蛋

作者头像
小柒2012
发布2018-04-16 13:48:08
5700
发布2018-04-16 13:48:08
举报
文章被收录于专栏:IT笔记IT笔记

20120717080845_209.png

Git for Windows. 国内直接从官网下载比较困难,需要访问外国网站。这里提供一个国内的下载站,方便网友下载。

点我

Git 全局设置:

git config --global user.name "小柒2012"
git config --global user.email "345849402@qq.com"
//禁用自动转换 windows下可能会出现问题
git config --global core.autocrlf false
//查看信息
git config --list 

创建 git 仓库:

mkdir springboot_dubbo_consumer
cd springboot_dubbo_consumer
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.oschina.net/52itstyle/springboot_dubbo_consumer.git
git push -u origin master

已有项目?

cd existing_git_repo
git remote add origin https://git.oschina.net/52itstyle/springboot_dubbo_consumer.git
git push -u origin master

显然,这只是个开始,接触新事物总没有坏处!!!

------------华丽的分割线(自言自语)------------

右键选项Git Bash Here
git init
git add .
git commit -m "初交"
git remote add origin https://git.oschina.net/52itstyle/spring-boot-mongodb.git
#两个不同的项目 先更新
git pull origin master --allow-unrelated-histories
#也可以试用这个
git pull --rebase origin master
git push -u origin master
#最后你也可以
rm -rf .git

https 方式每次都要输入密码,按照如下设置即可输入一次就不用再手输入密码的困扰而且又享受 https 带来的极速

按照以下设置记住密码十五分钟:

git config --global credential.helper cache

如果你想自定义记住的时间,可以这样:

git config credential.helper 'cache --timeout=3600' //这里记住的是一个小时,如需其他时间,请修改3600为你想修改的时间,单位是秒

你也可以设置长期记住密码:

git config --global credential.helper store

更多参考:http://www.bootcss.com/p/git-guide/

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-07-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档