Mac 中 Github 配置和使用
2013-11-22 00:15
477 查看
1、下载安装 Git for Mac
2、配置 Git
3、创建仓库
参考一
参考二
参考三
2、配置 Git
$ 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 # 在上述设置完毕后,可通过这两条命令查看自己的设置
3、创建仓库
远程:首先在 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主分支上
参考一
参考二
参考三
相关文章推荐
- 【GitHub】在Mac上配置/使用Github
- Mac 中 Github 配置和使用
- Mac 下 配置使用 github
- 【GitHub】在Mac上配置/使用Github
- 在Mac上配置/使用Github
- 如何在Mac上配置/使用Github
- 在Mac上配置/使用Github
- 如何在Mac上配置/使用Github
- mac中github的配置以及使用
- gitHub的配置和使用(Mac版)
- 【GitHub】在Mac上配置/使用Github
- Github for Mac配置和使用
- 在苹果MAC OS X Lion系统上使用Outlook for MAC 2011配置Exchange
- mac下git与github简单使用
- Mac下Android Studio使用github
- Qt Creator 中配置和使用 Git / Github
- Hexo+GitHub搭建静态博客平台(二)-配置网站及使用
- MAC Github的使用方法
- MAC平台在Xcode环境中配置使用OpenCV
- Git 多账户配置使用,同时使用github 和 gitoschina