.gitignore API

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

GitLab에서 /gitignores 엔드포인트는 Git .gitignore 템플릿 디렉터리을 반환합니다. 자세한 내용은 .gitignore를 위한 Git 문서를 참조하십시오.

모든 .gitignore 템플릿 가져오기

모든 .gitignore 템플릿의 디렉터리을 가져옵니다.

GET /templates/gitignores

예시 요청:

curl "https://gitlab.example.com/api/v4/templates/gitignores"

예시 응답:

[
  {
    "key": "Actionscript",
    "name": "Actionscript"
  },
  {
    "key": "Ada",
    "name": "Ada"
  },
  {
    "key": "Agda",
    "name": "Agda"
  },
  {
    "key": "Android",
    "name": "Android"
  },
  {
    "key": "AppEngine",
    "name": "AppEngine"
  },
  {
    "key": "AppceleratorTitanium",
    "name": "AppceleratorTitanium"
  },
  {
    "key": "ArchLinuxPackages",
    "name": "ArchLinuxPackages"
  },
  {
    "key": "Autotools",
    "name": "Autotools"
  },
  {
    "key": "C",
    "name": "C"
  },
  {
    "key": "C++",
    "name": "C++"
  },
  {
    "key": "CFWheels",
    "name": "CFWheels"
  },
  {
    "key": "CMake",
    "name": "CMake"
  },
  {
    "key": "CUDA",
    "name": "CUDA"
  },
  {
    "key": "CakePHP",
    "name": "CakePHP"
  },
  {
    "key": "ChefCookbook",
    "name": "ChefCookbook"
  },
  {
    "key": "Clojure",
    "name": "Clojure"
  },
  {
    "key": "CodeIgniter",
    "name": "CodeIgniter"
  },
  {
    "key": "CommonLisp",
    "name": "CommonLisp"
  },
  {
    "key": "Composer",
    "name": "Composer"
  },
  {
    "key": "Concrete5",
    "name": "Concrete5"
  }
]

단일 .gitignore 템플릿 가져오기

단일 .gitignore 템플릿을 가져옵니다.

GET /templates/gitignores/:key
속성 유형 필수여부 설명
key string yes .gitignore 템플릿의 키

예시 요청:

curl "https://gitlab.example.com/api/v4/templates/gitignores/Ruby"

예시 응답:

{
  "name": "Ruby",
  "content": "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/\n/spec/examples.txt\n/test/tmp/\n/test/version_tmp/\n/tmp/\n\n# dotenv 라이브러리를 사용하여 환경 변수를 로드하도록 지정되었습니다.\n# .env\n\n## RubyMotion에 특화됨:\n.dat*\n.repl_history\nbuild/\n*.bridgesupport\nbuild-iPhoneOS/\nbuild-iPhoneSimulator/\n\n## RubyMotion에 특화됨(CocoaPods 사용):\n#\n# .gitignore에 Pods 디렉터리를 추가하는 것을 권장하지 않습니다. 하지만\n# 자체적으로 판단하십시오. 장단점은 다음 위치에서 설명되어 있습니다:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# vendor/Pods/\n\n## 문서 캐시 및 생성된 파일:\n/.yardoc/\n/_yardoc/\n/doc/\n/rdoc/\n\n## 환경 정규화:\n/.bundle/\n/vendor/bundle\n/lib/bundler/man/\n\n# 라이브러리나 젬을 위한 것이므로, 코드를 여러 환경에서 실행할 것으로 예상되므로 이러한 파일을 무시하고 싶을 수 있습니다; 그렇지 않은 경우, 이러한 파일을 확인하십시오:\n# Gemfile.lock\n# .ruby-version\n# .ruby-gemset\n\n# rvm < 1.11.0을 지원하지 않거나 무언가를 해결하는 것이 아니라면, 이것을 무시하십시오:\n.rvmrc\n"
}