要説是代码管理工具,什么CVS, SVN 都过时了,现在用的最多的,要属GIt ,这玩意,那才是正统。
不过可惜的是,它是收费的,一般的company是不会花费钱去在这个上面构建Projects的,哎,还是忍了吧。
当然了,不能说CVS, SVN 等的都不好,只是相对而言比较差点而已。O(∩_∩)O~ ,个人观点了。
废话不说了,看看如何在windows系统上,将自己花费了老多时间coding的codes upload到git上去吧,基本上是执行如下7步骤就可以了。
1. 创建github并登陆账号,登陆官网:https://github.com/ 去创建账号和创建一个仓库。
2. 下载并安装 github ,https://windows.github.com/ ,一个windows下的界面化管理工具。
3. 安装好之后,会在我的本地创建一个仓库的文件夹.如:(C:\Users\Administrator\Documents\GitHub)
4. 在第 1 步中,创建的仓库中会有如下的这样的提示:
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/yourName/yourProject.git
git push -u origin master
5. 打开在第 2 步中安装好的 Git Shell ,并登陆到本地创建的仓库:如:(C:\Users\Administrator\Documents\GitHub)
切换到 cd C:\Users\Administrator\Documents\GitHub 目录
6. 将项目整个的内容都copy过来,然后执行第 4 步中的操作。
7. 如此上诉的6步之后,就可以在github上挂载上你的codes啦.
如果要提交多个projects,就不需要每次都git init 啦。
错误处理:
要是再次更新代码,可能会报错:
github unable to access 'https://github.com/...: Failed to connect to github.com port 443‘
这个的原因是:因为没有用户名和密码登陆,重新登陆就OK!或者使用 : git remote add origin https://name:pass@github.com/yourName/yourProject.git , name: 你在github
上的用户名,pass:你的登陆密码.