CloudBaby:commit to github in windows 7
来源:互联网 发布:闪电网络货币代码 编辑:程序博客网 时间:2024/04/30 02:32
本篇博客,介绍如何把自己的项目放到 github 上面,算是一个入门的介绍。
确保你安装了 msysgit TortoiseGit 和 android eclipse 开发环境。
一、创建 github 账号
在 github 官网创建一个账号,
二、Create a New Repository
选择第一个即可创建。填好名称后Create,之后会出现一些仓库的配置信息。
三、本地目录初始化
在 eclipse 下面新建了一个 CloudBaby 项目
我将要上传的项目父目录 E:\gitmyprojects,进入该目录右键,选择 Git Init Here,会多出来一个.git 文件夹
如果你看不到,那就是你隐藏了这类文件夹。
四、配置 ssh key
进入刚才那个目录里面,右键 Git Bash 进入 git 命令行。
执行:ssh-keygen -t rsa -C "your_email@youremail.com"
your_email@youremail.com 改为你的邮箱,之后会要求确认路径和输入密码,使用默认的一路回车就行。
成功的话会在
下生成 .ssh 文件夹,进去,打开 id_rsa.pub,复制里面的 key。
回到 github,进入 Account Settings,
左边选择 SSH Keys,
Add SSH Key, title 随便填,粘贴 key(带上 ssh-rsa)。
为了验证是否成功,在 git bash 下输入:
ssh -T git@github.com
如果是第一次的会提示是否 continue,输入 yes 就会看到:
You’ve successfully authenticated, but GitHub does not provide shell access 。
这就表示已成功连上 github。
五、设置 username 和 email
git config --global user.name "your name"
git config --global user.email "your_email@youremail.com"
关闭 git 终端。
六、配置远程地址
进入 CloudBaby 目录,右键 Git Bash 进入 git 命令行
git remote add origin git@github.com:yourName/yourRepo.git
yourName 和 yourRepo 表示你在 github 的用户名和刚才新建的仓库名称(第二步中创建的)。
加完之后进入 .git,打开 config,这里会多出一个 remote “origin” 内容,这就是刚才添加的远程地址。
当然,也可以直接修改 config 来配置远程地址。
七、添加 README
在本地仓库里添加一些文件,比如 README(在 CloudBaby 目录新建这样一个文件,在执行下面命令)
git add README
git commit -m "first commit"
八、提交项目
在 eclipse 里面右键项目 CloudBaby 里面选择需要忽略不上传的文件。
如 bin gen目录,选择Team/ignore 即可!
最后,执行
git push origin master
成功之后,在 github 上面就可以看见自己的项目了!
感谢:
【Github教程】史上最全github使用方法:github入门到精通
http://blog.csdn.net/code52/article/details/8807785
更多内容,关注后期博客!
- CloudBaby:commit to github in windows 7
- Github windows: Commit failed: Failed to create a new commit
- Github for Windows:Commit failed: Failed to create a new commit
- github basic usage in windows
- Add Shortcut to "SendTo" in Windows 7
- How to disable VirtualStore in Windows 7?
- github commit 报错:error: failed to push some refs to 'https:'错误解决方法
- GitHub commit failed
- github 删除commit
- How to create folder in github repository?
- How to Enable or Disable Access to Windows Updates in Windows 7
- commit修改内容到github
- eclipse与GitHub之【commit】
- Atomic Commit In SQLite
- How to change MAC address in windows 7
- How to enable ping response in windows 7?
- Commit to Excellence
- Notice to users of DB Query Analyzer in Windows 7, Windows 8 and Windows 10
- Oracle 索引与表分析几种方法
- android通话过程RIL层详细分析(代码)
- Oracle数据库常用技巧-清空表数据
- 关于阿里云服务器本地访问不了的问题
- unity3d: Asset Store 下载的package存放位置
- CloudBaby:commit to github in windows 7
- 打通linux的tty驱动的数据链路
- 一个人上楼,他有两种走法,走一阶或走两阶,问他上N阶楼梯有几种走法?
- How do I install a Package Manager within Cygwin ?
- HP-UX静默安装oracle11g过程
- 一般经验总结
- Ubuntu12.04下java1.6版本安装和互相切换
- ZMap在Ubuntu下的编译安装
- MFC中窗口收到WM_PAINT消息是如何处理的,什么情况下产生WM_PAINT消息