Git Repository
Add starting contents to your Git repository, and make sure that your team can access it.
Steps
Step 1. Getting a working copy from GitLab
First, you need to git clone
your GitLab repository to your local machine so that you have a working copy.
Open the web page for your GitLab project. Click on the Code
button, and copy the URL from Clone with HTTPS
.

In a terminal, on your computer, cd
to the location where you want to keep your source code. git clone
the URL.
$ git clone https://git.uwaterloo.ca/cs346/public/mm.git
In this example, we would have a folder named mm
that contains the contents of the Git repository.
Step 2. Add .gitignore file
You should add a .gitignore
file to the top level of your project, specifying which files to NOT include
in your repository. Typically, this should include items like:
- IDE configuration files
- Build output directories
- Temporary files
- Class files
- Private keys
Here is an example of a .gitignore
file that I use:
$ cat .gitignore
build/
out/
*.class
*.tmp
.DS_Store
.idea
Step 3: Add README file
You should create a file in the root of your source tree named README.md
. This will be displayed by default when users browse your project and serves as the main landing page for your project.
You must have at least the following details included in your README.md.
- Project name
- Project description (1-2 sentence description)
- Team details, including names/contact info
Example README
Uber-Tweets
The Uber-eats app for parakeets!
Team 101-07
We are a small-but-mighty 2 person team.
- Jeff Avery jeffery.avery@uwaterloo.ca
- Caroline Kierstead ctkierst@uwaterloo.ca
Our team contract includes details on how we will work together.
Step 4: Add team contract
In your Wiki, create a page for your Team Contract and link it to your README.md
(see above).
Minimally, your team contract needs to contain:
- Names and contact information (i.e. WatID) of all team members.
- Agreement on how you will meet in-person e.g., how often, and location. You are expected to meet at least twice per week and document it.
- Agreement on how you will communicate e.g., email, Messages, WhatsApp, MS Teams. You need one agreed-up communication channel that everyone will check.
- Agreement on team roles: who is the project lead? Are people taking on specific design responsibilities?
- Agreement on how the team will make decisions. Do you vote? Do you need a majority?
See the templates repository for a sample team contract.
Step 5. Push changes to the repository
Once you have confirmed that your project is working, you can commit and push the changes.
$ git add *
$ git commit -m "Initial commit"
$ git push
Step 6. Share with your team
Your teammates should now be able to git clone
the project URL to get a copy of this repository.
Final Word
