{"id":24764615,"url":"https://github.com/juancarlosjr97/codespaces-git-playground","last_synced_at":"2025-03-23T16:28:36.767Z","repository":{"id":219935485,"uuid":"749561846","full_name":"juancarlosjr97/codespaces-git-playground","owner":"juancarlosjr97","description":"Codespaces Git Playground","archived":false,"fork":false,"pushed_at":"2025-02-17T19:34:14.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T20:32:29.302Z","etag":null,"topics":["codespaces","git","github","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juancarlosjr97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T23:08:22.000Z","updated_at":"2025-02-17T19:34:18.000Z","dependencies_parsed_at":"2024-01-30T13:27:22.127Z","dependency_job_id":"318f9752-c984-4dc2-aaa7-45e2c279343b","html_url":"https://github.com/juancarlosjr97/codespaces-git-playground","commit_stats":null,"previous_names":["juancarlosjr97/codespaces-git-playground"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlosjr97%2Fcodespaces-git-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlosjr97%2Fcodespaces-git-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlosjr97%2Fcodespaces-git-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlosjr97%2Fcodespaces-git-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juancarlosjr97","download_url":"https://codeload.github.com/juancarlosjr97/codespaces-git-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245130285,"owners_count":20565626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codespaces","git","github","python"],"created_at":"2025-01-28T22:33:16.758Z","updated_at":"2025-03-23T16:28:36.756Z","avatar_url":"https://github.com/juancarlosjr97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codespaces Git Playground\n\nThis project is a guide on how to spin up a fully configured dev environment in the cloud ready for development using the blank canvas provided by GitHub using Codespaces.\n\n\u003e [!WARNING]\n\u003e Codespaces are deleted automatically after 30 days of inactivity. Read more about [Codespace lifecycle][1].\n\n## Prerequisites\n\nGitHub account created.\n\n- [GitHub][2]\n\n## Codespace Benefits: Elevate Your Development Experience 🚀\n\n- Instant, customizable development environment\n- Accessible from any device with Internet\n- Facilitates real-time collaboration\n- Seamless Git and GitHub integration\n- Scalable with adjustable resources\n- Supports Visual Studio Code extensions\n- Container-based isolation for consistency\n- Efficient onboarding with time and resource savings\n- Disposable environments for testing and experimentation\n- GitHub manages the underlying infrastructure\n- Integrated with GitHub Actions for automation\n\n## Codespace Quickstart using Template\n\nThe link below provides a quickstart to spin up an environment using this template as a base project.\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/juancarlosjr97/codespaces-git-playground?quickstart=1)\n\n## Creating a repository from a template\n\nFollow this [guide][3] to create a repository from this template.\n\nAfter creating a project from this template, navigate to the README.md file and switch to code view. Then update the [line 29][4] by replacing `juancarlosjr97/codespaces-git-playground` with the path of the project created. It will be a combination of the GitHub username joined with the name of the GitHub repository as `${GITHUB_USERNAME}/${GITHUB_REPOSITORY}`.\n\n## Developing in Codespace\n\nWhen a Codespace is created it comes with Git automatically authenticated with the credentials of the associated GitHub account. Additionally, it comes with basic tools such as `python` ready to start development. For more information, read the official [GitHub Documentation][5].\n\n## Git Exercise from Codespaces\n\n### Git and Python Version\n\nAfter you have the Codespace up and running, run the following code from the terminal. Ensure you use capital V for the Python version command:\n\n```bash\ngit -v\npython -V\n```\n\nThe result should be similar to the below code, but it might differ from the versions on each Codespace:\n\n```bash\ngit version 2.47.1\nPython 3.12.1\n```\n\n### Running Python script\n\nExecute the below script to run the Python code located in [`main.py`][6]:\n\n```bash\npython -m src.main\n```\n\nUpon successful execution, the script will return: `Congratulations, you are running the Python script from a GitHub Codespace environment. Now, it is 29-01-2024 22:29 and time for further development.`\n\nPlease note that the date and time will vary depending on when the script is run.\n\n### Updating the Script\n\n1. Open the python file located on `./src/main.py`\n2. Update the line [4][7] by updating the `strftime` to `%d-%m-%Y %H:%M:%S`. This update will format the date to include seconds.\n3. Run the Python script again and should return the date as a string with seconds. For example, `29-01-2024 22:35:35`.\n\nCongratulations, you have updated the Python script!\n\n### Committing and Pushing the changes\n\nAfter making the changes, the next step is to commit and push the changes to your GitHub repository.\n\n_To do this step, the project needs to be created from the template in order to have permission to make changes to the project. Follow these steps [Creating a repository from a template][8]_\n\n1. Stage the changes\n\n   ```bash\n   git add src/main.py\n   ```\n\n2. Commit the changes\n\n   ```bash\n   git commit -m \"Adding seconds to date time formatting:\"\n   ```\n\n3. Push the changes\n\n   ```bash\n   git push\n   ```\n\nCongratulations! You have successfully staged, committed, and pushed the changes to the remote repository. The dynamic date and time formatting feature has been added to the[`main.py`][6] script. Now, it is ready for further collaboration and development.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE][9] file.\n\n## Support Information\n\n- [CODESPACES DOCUMENTATION][10]\n- [LICENSE][9]\n\n[1]: https://docs.github.com/en/codespaces/getting-started/understanding-the-codespace-lifecycle\n[2]: https://docs.github.com/en/get-started/quickstart/creating-an-account-on-github\n[3]: https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template\n[4]: #codespace-quickstart-using-template\n[5]: https://docs.github.com/en/codespaces/developing-in-a-codespace/developing-in-a-codespace\n[6]: ./src/main.py\n[7]: ./src/main.py#L4\n[8]: #creating-a-repository-from-a-template\n[9]: ./LICENSE\n[10]: https://docs.github.com/en/codespaces\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuancarlosjr97%2Fcodespaces-git-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuancarlosjr97%2Fcodespaces-git-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuancarlosjr97%2Fcodespaces-git-playground/lists"}