Git|Git补充(五)

配置文件存放三个位置

  • 项目配置文件:项目/.git/config
git config --local user.name 'juran'
git config --local user.email 'juran@xx.com
  • 全局配置文件:~/.gitconfig
git config --global user.name 'juran'
git config --global user.name 'juran@xx.com
  • 系统配置文件:/etc/.gitconfig
git config --system user.name 'juran'
git config --system user.name 'juran@xx.com'
注意:需要有root权限

免密码登录

  • URL中体现
原来的地址:https://github.com/juran/dbhot.git
修改的地址:https://用户名:密码@github.com/juran/dbhot.git
git remote add origin https://用户名:密码@github.com/juran/dbhot.git 
git push origin master
  • SSH实现
1.生成公钥和私钥(默认放在~/.ssh目录下,id_rsa.pub公钥、id_rsa私钥) ssh-keygen

2.拷贝公钥的内容,并设置到github中。 

3.在git本地中配置ssh地址
git remote add origin git@github.com:juran/dbhot.git

4.以后使用
git push origin master

git忽略文件

让Git不再管理当前目录下的某些文件。

*.h    
!a.h  
files/  
*.py[c|a|d]

更多参考:https://github.com/github/gitignore

github任务管理相关

  • issues,文档以及任务管理。
  • wiki,项目文档。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值