mac上git的安装与配置
来源:互联网 发布:mac图片怎么保存 编辑:程序博客网 时间:2024/05/21 15:49
这里假设用户名和邮箱分别是xxx和xxx@email.com
下载Git installer,地址;http://git-scm.com/downloads
下载之后打开,双击.pkg安装
cd ~/.ssh
ssh-keygen -t rsa -C xxx@email.com
将生成的key(id_rsa.pub文件)内容copy到github SSH Public Keys
测试链接
sshgit@github.com
同理把公钥放到git@osc上
git config --globaluser.name “xxx"
git config --global user.email “xxx@email.com"
如果不想每次连接远程仓库都输入密码的话,输入如下命令(但是这里不生效)
git credential-osxkeychain
git config --global credential.helper osxkeychain
设置整个Git仓库需要忽略的文件
在~/目录下
touch .gitignore_global
vim .gitignore_global
按i进入编辑状态,输入以下内容
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/
#Git
.gitingore
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/
#Git
.gitingore
.gitingore.swp
敲esc键退出编辑,敲:wq保存退出
输入命令
git config --global core.excludesfile .gitignore_global
现在就可以使用git了
0 0
- mac上git的安装与配置
- Mac下git的安装与配置
- mac上配置git,及Homebrew安装
- Mac上Git的安装与简单使用
- mac下的git的安装与简单的配置
- Mac上安装Git
- Mac上安装Git
- Mac上安装Git
- Mac上安装Git
- Mac上安装Git
- mac上安装git
- [Git] Mac 上安装 Git
- mac上zsh|macvim|powerline的安装与配置
- Mac上的Apache Tomcat安装与配置
- MAC上PyCharm调试Tensorflow的环境安装与配置
- Mac上MacVim安装与配置
- Mac上安装MySql与简单配置
- Mac系统git的使用与配置
- 安卓控件使用系列33:ViewPager多页面滑动控件的使用方法2
- Game Programming Patterns-再探Flyweight模式
- Tutorial: Using Gazebo plugins with ROS
- 真迹调试小错误
- POJ 2082 The Fewest Coins
- mac上git的安装与配置
- c#多维数组
- 责任链模式----ChainOfResponsibility
- java线程池学习(四) —— Executors类
- IOS开发-属性动画和关键帧动画的使用
- sql server数据类型详解
- UIScrollView和UIPageControl组合照片浏览滑动效果
- Java核心技术第4章(2)
- leetcode题目 合并N个排序好的链表