Skip to content

Instantly share code, notes, and snippets.

@oleksis
Last active January 28, 2024 03:21
Show Gist options
  • Save oleksis/26695129986c8a5806f3a1ca1531e5be to your computer and use it in GitHub Desktop.
Save oleksis/26695129986c8a5806f3a1ca1531e5be to your computer and use it in GitHub Desktop.
How Can I Contribute to the Black Python Developers Website using a development containers?

How Can I Contribute to the Black Python Developers Website?

This guide shows you how to contribute to the Black Python Developers website using a development containers. A dev container is a Docker container that provides a full-featured development environment for your project. By using a dev container, you can avoid installing and configuring software on your local machine, and you can ensure that your development environment is consistent and reproducible.

This guide assumes that you have:

You also need a GitHub account and a fork of the Black Python Developers repository.

To contribute to the website using a dev container, follow these steps:

  • Open the forked repository in Visual Studio Code.
  • Click the "Reopen in Container" button in the notification that appears, or use the command "Dev Containers: Reopen in Container" from the Command Palette (F1).
  • Wait for the container to build and start.
  • Run the website locally and make changes to the code:

You can now work on the website code inside the dev container. The container has the tools that are available such as Python, Ruby, Jekyll, and VS Code extensions. You can also install additional software or extensions if you need to. To run the website locally, follow these steps:

Open a new terminal (Terminal > New Terminal) and enter the command bundle exec jekyll serve or run the default Build Task (Ctrl+Shift+B). This will start a local web server that hosts the website. You can access the website from your browser by going to http://localhost:4000.

  • Commit and push your changes to GitHub. You can use Git to commit and push your changes to GitHub. You can also use the GitHub Pull Requests and Issues extension to manage pull requests and issues from VS Code.

To commit and push your changes using the Source Control view, follow these steps:

  • Open the Source Control view (Ctrl+Shift+G) and select the changes that you want to commit.
  • Enter a commit message and click the "Commit" button.
  • Click the "Synchronize Changes" button to push your changes to GitHub.

To commit and push your changes using the terminal, follow these steps:

  • Open a terminal and enter the command git status to see the changes that you have made.
  • Enter the command git add . to stage all the changes, or git add <file> to stage a specific file.
  • Enter the command git commit -m "<message>" to commit the changes, where is your commit message.
  • Enter the command git push to push your changes to GitHub.
  • Create a pull request from your forked repository to the original repository.

External links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment