-
Notifications
You must be signed in to change notification settings - Fork 2
Publish the Changes
Discover how to contribute to the Tilburg Science Hub website, from creating the content to publishing it on the website.
If the local preview looks good, it's time to publish the changes. Whether you're updating existing content or adding new content, follow these steps:
Follow Best Practices for Naming Git Branches and use "git checkout -b <branch_name>" in terminal/command prompt to create and switch to a new branch, or use GitHub Desktop - "New branch" button.
Creating a new branch can be done on the GitHub Website as well: when you are in the right repository, navigate to the branches and find the green "New branch" button on the right of your screen.
Make the necessary changes to the code or files in your local repository. If you have made the changes before creating a new branch, make sure to bring your changes to the new branch when switching the branches (only when using GitHub Desktop).
On the GitHub website, you also have the option to edit an existing file or upload a new file to make changes. Depending on the change you want to make, you may prefer using the GitHub website or GitHub Desktop. The same principle applies to the following steps; while the GitHub website might be more user-friendly and intuitive for beginners, the Desktop version is usually more efficient once you become familiar with it.
Stage the changes using "git add". Open your terminal/command prompt, navigate to the repository root directory, and run the "git add ." command to stage all changes. If you only want to stage specific files, replace . with the file names you want to include. Commit the changes using "git commit" and include a descriptive commit message ("git commit -m 'Your commit message here'").
In GitHub Desktop, make sure to choose the newly created branch (in "Current branch"), then select all changes that you want to include in the commit, write a commit message, and then click the "Commit to <branch_name>" button.
Use "git push origin <branch_name>" to push the changes from your local branch to the repository on GitHub. In GitHub Desktop, click "Push origin" in the repository bar to push your local changes to the remote repository.
Image from GitHub Docs.
Tilburg Science Hub is a collaborative project and contributions are reviewed through pull requests. This allows repository maintainers to review your changes before merging them into the main branch.
To create a pull request, you have two options: you can either use the GitHub website or utilize GitHub Desktop.
- GitHub Website:
- Navigate to the repository on the GitHub website (https://github.com/tilburgsciencehub/website).
- Click on the "Pull requests" tab.
- Click on the "New pull request" button.
- You'll be presented with the base and compare branches; choose the branches you want to merge.
- Review your changes and provide a descriptive title and comment.
- Finally, click on "Create pull request" to initiate the pull request.
- GitHub Desktop:
- Click on "Preview Pull Request" to review the changes and ensure everything looks good.
- If everything is in order, click on "Create Pull Request" to start the pull request process.
- GitHub Desktop will open your default browser to take you to GitHub.
Image from GitHub Docs.
- Home
- Our organization
- Our core values
- Getting organized
- Working on Projects
- Contributing to the TSH website
- Notes for Deboarding