Mac 中 Github 配置和使用
2014-11-08 00:00
411 查看
摘要: Github是一个基于git的代码托管平台,作为开源代码库以及版本控制系统,Github目前拥有140多万开发者用户。随着越来越多的应用程序转移到了云上,Github已经成为了管理软件开发以及发现已有代码的首选方法。
2、配置 Git
3、创建仓库
登陆github.com账号创建仓库(Create a New Repository)。付费用户可以建私人仓库,一般的免费用户只能使用公共仓库。
4、参考:
Create A Repo
Git命令与Github的使用
两分钟学会在GitHub托管代码
1、下载安装 Git for Mac
注:以下代码$开头的为命令,#开头为注释$ git config --global user.name "Your Name Here" # Sets the default name for git to use when you commit $ git config --global user.email "your_email@example.com" # Sets the default email for git to use when you commit # 在上述设置完毕后,可通过这两条命令查看自己的设置 $ git configuser.name $ git config user.email
2、配置 Git
一、远程: 首先在 Github.com 上创建一个repository (例:Hello-World) 二、本地: $ mkdir ~/Hello-World # 在本地的~/目录下创建一个 git 仓库,目录创建在别处也可以 $ cd ~/Hello-World # 切换至刚创建好的目录 $ git init # 初始化一个本地的 git仓库,生成隐藏的.git目录 三、添加: $ touch README # Creates a file called "README" in your Hello-World directory #(可以添加.txt .md .html等格式后缀),找到后可打开编辑。 $ git add README # Stages your README file, adding it to the list of files to be committed # 把README文件添加到仓库中 $ git commit -m 'first commit' # Commits your files, adding the message "first commit" # 执行提交说明 四、提交: $ git remote add origin https://github.com/username/Hello-World.git # Creates a remote named "origin" pointing at your GitHub repository # 使用https协议指定、连接远程仓库地址 $ git push origin master # Sends your commits in the "master" branch to GitHub # 推送本地仓库到远程指定的master主分支上
3、创建仓库
登陆github.com账号创建仓库(Create a New Repository)。付费用户可以建私人仓库,一般的免费用户只能使用公共仓库。
4、参考:
Create A Repo
Git命令与Github的使用
两分钟学会在GitHub托管代码
相关文章推荐
- 【GitHub】在Mac上配置/使用Github
- 如何在Mac上配置/使用Github
- 【GitHub】在Mac上配置/使用Github
- gitHub的配置和使用(Mac版)
- 在Mac上配置/使用Github
- Mac 中 Github 配置和使用
- Github for Mac配置和使用
- 在Mac上配置/使用Github
- Mac 下 配置使用 github
- 如何在Mac上配置/使用Github
- 【GitHub】在Mac上配置/使用Github
- mac中github的配置以及使用
- Mac使用学习笔记: MacVim & exvim 配置使用手记
- 在苹果MAC OS X Lion系统上使用Outlook for MAC 2011配置Exchange邮箱 推荐
- Mac使用git/github小结
- 在苹果MAC OS X Lion系统上使用系统自带程序配置Exchange邮箱
- 在苹果MAC OS X Lion系统上使用Outlook for MAC 2011配置Exchange
- mac下使用brew配置环境的步骤分享
- 【Mac使用基础】git config 全局配置,user.name和user.email 设置
- 验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate