Suggested Workflow for Feature Changes - Tau-Beta-Pi-MIT/website GitHub Wiki
feature/branch workflow):
Suggested workflow for making changes (- Create a branch on the GitHub repository for the feature you’d like to add (e.g. a button for logging tutoring hours):
git checkout -b name_of_your_branch
- Make changes to this codebase on the new branch on your local machine. Once you're ready to commit and push your changes:
git add .
git commit -m "your_commit_statement"
git push -u origin name_of_your_branch
- Now navigate to the repository on the Athena server, by following the instructions in the section above ("Navigating to our code on the Athena server"). Once there, fetch the new branch using a git fetch of this syntax:
git fetch <remote-repo> <remote-branch>:<local-branch>
(give it the same name for simplicity):
git fetch origin name_of_your_branch:name_of_your_branch
- Now checkout the new branch on the Athena server:
git checkout name_of_your_branch
-
Next, inspect the website at tbp.mit.edu/www to make sure your changes appear as you'd expect and are free of bugs. NOTE: Changes don't always appear immediately, so you noticed that nothing has changed on tbp.mit.edu/www, give it a little more time to wait for the changes to be visible. If you're using an IDE such as PyCharm, you can also do this locally by examining any of the
.shmtl
files on yourlocalhost
server port. -
Once you're satisfied with how everything looks, perform a merge pull request on the GitHub repo (this is accomplished most effectively by just doing this through GitHub online). Integrate your new changes with the master branch (or have other members of the development team review your changes, and then pull) and then (on both your local machine and the Athena server), switch back to the master branch and pull:
git checkout master
git pull
- Finally, after you pull again on both your local computer and the remote Athena server, verify that the website looks as you'd expect it to and is free of bugs!