Jump to content

Git/Special files: Difference between revisions

From Bath Wiki
Translate from boss.bathcs.com
 
m Add a see also section
Line 78: Line 78:


This is better explained [[Git/GitLab#MR Templates|here]].
This is better explained [[Git/GitLab#MR Templates|here]].
== See also ==
{{Special:PrefixIndex|prefix=Git|namespace=0}}
[[Category:Tutorial]]

Revision as of 20:37, 3 June 2026

In git there are some files which have some importance, either on your remote repository or just in general.

README

File location: README.md.

When creating a repository on GitHub or GitLab, it will ask if you want to initialise it with a README. This is a file written in markdown, which just contains a description of what the project is.

If you visit a project e.g. froom, you will see a description rendered below all the files. This is the README, which both GitLab and GitHub will render on the home directory of your project.

LICENSE

File location: LICENSE or LICENSE.txt.

This stores how a project can be used and altered, if none is given it can be assumed that all rights are reserved. There are strict laws protecting these statuses and so when copying code from open sources projects, please make sure you understand how you can use that code and what the license permits

For BOSS projects, we have our own License policy which states all our projects should use the Apache-2.0 WITH LLVM-exception license If you are contributing to BOSS, please read the policy for the full list of requirements.

Gitignore

File location: .gitignore

This file stores a list of files or folders which should never be included in your git commits.

These will usually include caching files or output directories which should be generated by the developer on their local machine.

An example for a project using deno, yarn and npm is:

# build output
dist/

node_modules
.yarn
!.yarn/releases
!.yarn/plugins
.pnp.*

.vscode
!.vscode/extensions.json
!.vscode/launch.json

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

But these will vary depending on the tools and language you are using in a given project.

Templates are available online or you can use generate a gitignore specific to your development setup.

Gitmodules

File location .gitmodules

In most cases, this is not required and so will not be in a repository, this is a special file which is normally autogenerated by the submodule command in git (and so probably shouldn’t be edited manually).

But this stores all the locations and repos of the submodules you have added.

GitLab CI

File location .gitlab-ci.yml

This file controls the pipelines on the project, see here for more information.

MR/Issue Templates

File location .gitlab/merge_request_templates/*.md and .gitlab/issue_templates/*.md.

This is better explained here.

See also