ETC5513: Collaborative and Reproducible Practices
Tutorial 9
🎯 Objectives
- Learn how to use
git
and GitHub when we are dealing with files larger than 100MB
Git LFS
Create a repository in GitHub called
etc5513-tutorial8-xx
wherexx
is your initials. In that repository, make sure that it has a license, a .gitignore file and a README.md file.Clone the repository to your local machine
Take the large zip file from moodle
Stage, commit and try to push this file.
What do you notice about the error?
Reset your previous commit.
Add this file using the
git lfs
workflow. Remember the quotes, and that your file extension is.zip
.
git lfs install
git lfs track "*.zip"
git add .gitattributes
git add .
git commit -m "Adding large file"
git push origin main
- Push the changes onto GitHub using an extended commit message.
git commit
(without the -m
flag) will open a text editor for you to type your extended commit.
Add a git annotated tag to the most recent commit called v1.0
.
Collaborating with others
With at least one other person, swap repository details. They do not need to add you as a collaborator at this stage.
Clone their repository to your computer.
Practice the following:
- Open a pull request with an identified issue with the report. This doesn’t have to be a real issue, it’s just for practicing our issues and commit messages.
- Your partner should fix the issue, and close the issue using a commit message.
- Practice the
git fetch
workflow, to update your local database without movingHEAD
. Then, move your repositoryHEAD
to the latest commit.