git学习手记五—自定义Git

1、设置忽略文件
如.class等文件在git status时不会提示未添加
在本地仓库新建.gitignore文件
如:H:\gitlearn\gitrep.gitignore
在github官网找对应的文件,复制内容到.gitignore文件中
https://github.com/github/gitignore
将Java.gitignore内容复制到.gitignore文件中

提交.gitignore文件
git add .
git commit -m “add .gitignore file”

2、使用别名(一般不用)
使用git ss代替git status
git config --global alias.ss status
会在用户目录下的.gitconfig加入对应的配置信息
C:\Users${用户名}.gitconfig

3、使用OpenSSH或CopSSH搭建自己的git服务器

你可能感兴趣的:(git,自定义git)