How to use GitHub with terminal commands[命令行下使用GitHub]
2014-03-13 00:53
489 查看
Step 1:安装Git
Step 2:创建一个Repo
1.打开浏览器,登录到GitHub,创建一个Repository,名字为helloworld.
2.如下:
3.刷新浏览器,你会发现helloworld仓库下面多了一个README文件了.
apt-get install git git config --global user.name 'deyin' # 请替换成你在GitHub上注册的用户名 git config --global user.email 'deyinx.chen@gmail.com' #请替换成你在GitHub上注册时使用的邮箱
Step 2:创建一个Repo
1.打开浏览器,登录到GitHub,创建一个Repository,名字为helloworld.
2.如下:
cd ~ mkdir github_workspace cd github_workspace mkdir helloworld cd helloworld git init touch README echo "This is my first github repo named helloworld">README git add README git commit -m 'add file README' # 到这里,所有的操作都是本地操作 git remote add origin https://github.com/deyin/helloworld.git # 准备添加一个origin版本到远程代码仓库,origin可以是任意名字,比如:a git push origin master # 将上一行的origin版本提交到master,假如上一行版本名字为a,则对应的命令:git push a master
3.刷新浏览器,你会发现helloworld仓库下面多了一个README文件了.
相关文章推荐
- Github桌面版使用方式(How to Use Github [Desktop Version])
- How to use bitBucket with EGit in Eclipse,如何在Eclipse中使用bitbucket远程仓库
- How to use GitHub with Android Studio
- How to use GitHub with Android Studio
- 如何在MMIT上使用WMLScript文件(How To Use WMLScript Files With MMIT)
- How to use GitHub with Android Studio
- jooq使用自定义策略生成代码(How to use a custom strategy with the jOOQ code-generator and Maven?)
- [Android] How to use github with android studio
- How to Use Linux Commands in Windows with Cygwin
- How to use lateral view explode() function in Hive (HIve 中的explode()函数使用)
- 使用LeanClound(AVOS)造成的ios linker command failed with exit code 1 (use -v to see invocation)
- How to create a DLL library in C and then use it with C#
- How to use VirtualBox in Terminal / Command line
- How to use ftrace to trace your kernel module(使用Ftrace跟踪你的内核模块)
- 使用C#创建计划任务(How to create a Task Scheduler use C# )
- Android:How to use loader in Android(如何使用Loader)
- How to Use Password Fields(密码框的使用)
- How to use JPA from a JBoss Web application ?(jboss 中如何使用线程安全的EntityManagerFactory )
- How to use udev for Oracle ASM in Oracle Linux 6 怎样使用udev在linux 6系统上使用asm
- How To Read and Write XML Documents with GDataXML(使用GData读写XML文档)