Welcome to the demo repository for Lab 5: Binary File I/O! This README provides instructions on how to fork this repository, make changes, and submit a pull request (PR), as well as a warm up of what students are expected to do for the lab assignment.
This section guides you through forking the repository, making edits, and submitting your changes via a pull request.
- Fork and clone this repo as described above.
- Explore the provided files (
tips.shp,main.cpp). tips is binary and can not be viewed. - Implement your solution based on the lab requirements.
- Test with the sample files and submit your PR.
Good luck with Lab 5! If you have questions, reach out to your instructor or TA.
Forking creates your own copy of this repository under your GitHub account.
- Log in to GitHub: Ensure you're signed into your GitHub account.
- Navigate to the Repository: Go to the main repository page (e.g.,
StrongKs/binaryIO_WarmUp). - Fork the Repo:
- Click the "Fork" button at the top-right corner of the page.
- Select your GitHub account as the destination.
- Wait for the forking process to complete. You'll now have a copy at
your-username/binaryIO_WarmUp.
Clone your forked repository to your local machine to start working on it.
- Open a Clion Window - New Project with Version Control: Open a project using version control
- Past Github URL: Copy from your new fork of the repo. Should look like:
https://github.com/your-username/binaryIO_WarmUp
Make your changes to the code or files as needed for the lab.
- Open the Project: Use your preferred IDE or text editor (e.g., VS Code, Visual Studio).
- Edit Files: Modify the files according to the lab requirements (see "Student Tasks" below).
- Example: Update
main.cppto read and process the binary files.
- Example: Update
- Test Your Changes:
- Compile and run your code locally to ensure it works.
Save your edits to your local repository.
- Stage Changes:
git add .- This stages all modified files. Use
git add <filename>for specific files.
- This stages all modified files. Use
- Commit Changes:
git commit -m "Add binary file reading functionality"- Write a descriptive commit message explaining your changes.
Upload your changes to your forked repository on GitHub.
- Push Changes:
git push origin main
- This pushes your commits to the
mainbranch of your fork.
- This pushes your commits to the
Submit your changes to the original repository for review.
- Go to Your Fork: Visit
https://github.com/your-username/lab5-demo. - Start a PR:
- Click the "Contribute" button or "Pull requests" tab.
- Click "New pull request".
- Set the Base Repository:
- Base:
StrongKs/binaryIO_WarmUp(original repo), branchmain. - Head:
your-username/binaryIO_WarmUp, branchmain.
- Base:
- Submit the PR:
- Add a title (e.g., "Lab 5 Submission - Your Name") and description.
- Click "Create pull request".
- Merge Conflicts: If your PR has conflicts, resolve them locally with
git pulland manual editing, then push again. - Lost Changes? Use
git statusandgit logto track your progress.
- Modified Files: Update
main.cpp(or other files as specified) with your solution. - Pull Request: Submit your changes via a PR to this repository with a clear title (e.g., "Lab 5 - Joshua Fox").