oliver-ricken / 3D_NCA

Growing 3 Dimensional Neural Cellular Automata. Pitzer College Spring 2024 Machine Learning Research with David Bachman, Ph.D.
0 stars 2 forks source link

Pull Request Tutorial #2

Open oliver-ricken opened 10 months ago

oliver-ricken commented 10 months ago

Hey all,

Now that you completed the initial tasks and the Git Tutorial posted in the first issue, we'll practice how to actually submit a pull request. After this tutorial, you will all have made your first contribution to our repo!

Oh no! The README file in the home page of our repo contains a few typos. There are 3 typos to fix, one for each person, and they are all in your name. Fortunately, since our project is hosted on GitHub, you can use git to fix this mistake, and change the README file so that your names are spelled correctly. Here are the steps:

Submitting a Pull Request

  1. Create a fork of our repo: Press Fork on the top of the page, and create your own fork of our repo.
  2. Clone your fork on your machine: Now, your fork of our repo is the local origin. Initialize a Terminal session, and in your terminal, enter the following (you may have to install git on your machine first):
git clone [url of your fork]
  1. Fix the typo in the README file: Now, your fork of our repo is stored on your machine. Go ahead and edit the README file locally and fix the typo found in your name only. You can do this in a text editor (such as VSCode) or directly in the terminal using VIM. VIM is probably easier for a small fix like this, but when we actually go about updating versions of our code, we'll likely want to edit the .ipynb file locally in VSCode or Colab, and the push the changes.
  2. Stage the changes: Now that the file has been updated, you'll want to stage the changes in Git. Enter the following in terminal:
git add [file_name]
  1. Commit the changes: Now that the changes have been staged, you'll want to commit the changes with a message (probably something like, "fixed typo in README") describing the updates. In Terminal, you'll type:
git commit -m "your message"
  1. Push your changes: Now, you want to push your changes to your fork. Type the following in Terminal:
git push origin master
  1. Submit a pull request: In the home page of your fork, submit a pull request to our master repo using the button at the top of the screen. I'll then accept the pull request, and then your changes will be reflected in our 3D NCA repo! You'll then be listed as a contributor :)

If you'd like more detailed instructions for this process, visit the following link. Also, don't hesitate to ask me any questions by responding to this issue :)

Good luck! Oliver

oliver-ricken commented 10 months ago

Also, here's a cheat sheet for Git that may be helpful for you all. ChatGPT is also a great tool for Git things, as well :) git-cheat-sheet-education.pdf