配置文件存放三个位置
- 项目配置文件:项目/.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,项目文档。