下载git客户端
打开git bash 进行配置
git config --global user.name "yourname"
git config --global user.email "your mail"
#查看当前的配置状态
git config --global --list
#生成密钥
ssh-keygen -t rsa -C "your mail"
这里你会按下多个enter,如果你不需要配置密码什么的话
找到本地id_rsa.pub的路径,记事本打开然后全部复制
然后进入github主页 右上角 setting->左边ssh
把公钥复制进去
配置好之后 就可以通过 git clone [link] 下载仓库代码
.gitignore 文件配置 忽略 idea pycharm 等不必要提交的内容
##ignore this file##
/target/
/.idea/
/.settings/
/.vscode/
/bin/
.classpath
.project
.settings
.idea
##filter databfile、sln file##
*.mdb
*.ldb
*.sln
##class file##
*.com
*.class
*.dll
*.exe
*.o
*.so
# compression file
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.via
*.tmp
*.err
*.log
*.iml
# OS generated files #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
.factorypath
/.mvn/
/mvnw.cmd
/mvnw
把.gitignore 放置在 repository的 git 通目录下
然后
#清理缓存
git rm -r --cached .
#添加所有新文件
git add .
git commit -m 'update .gitignore'
即可让配置生效