├── 1-your-first-repo ├── 01-introduction.sh ├── 02-repositories.sh ├── 03-git-commands.sh ├── 04-git-workflow.sh ├── 05-local-push.sh └── 06-read-me.sh ├── 2-exploring-repos ├── 07-git-clone.sh ├── 08-branch-out.sh ├── 09-git-and-teams.sh ├── 10-merges.sh ├── 11-pull-requests.sh └── 12-yearbook.sh ├── LICENSE └── README.md /1-your-first-repo/01-introduction.sh: -------------------------------------------------------------------------------- 1 | # Introduction 💻 2 | # Codédex 3 | 4 | git --version 5 | -------------------------------------------------------------------------------- /1-your-first-repo/02-repositories.sh: -------------------------------------------------------------------------------- 1 | # Repositories 📂 2 | # Codédex 3 | 4 | # You don't have to do anything in the terminal here! 5 | -------------------------------------------------------------------------------- /1-your-first-repo/03-git-commands.sh: -------------------------------------------------------------------------------- 1 | # Git Commands 📺 2 | # Codédex 3 | 4 | # Make sure you're changed into your project folder first: 5 | cd Desktop 6 | cd terminal-game 7 | pwd 8 | 9 | # Run this: 10 | git init 11 | git remote add origin https://github.com/username/repo-name.git 12 | git branch -M main 13 | -------------------------------------------------------------------------------- /1-your-first-repo/04-git-workflow.sh: -------------------------------------------------------------------------------- 1 | # Git Workflow 🔄 2 | # Codédex 3 | 4 | git add . 5 | git commit -m 'Initial commit' 6 | -------------------------------------------------------------------------------- /1-your-first-repo/05-local-push.sh: -------------------------------------------------------------------------------- 1 | # Local Push 🫸🏼 2 | # Codédex 3 | 4 | git status 5 | git push -u origin main 6 | -------------------------------------------------------------------------------- /1-your-first-repo/06-read-me.sh: -------------------------------------------------------------------------------- 1 | # Read Me 🗒 2 | # Codédex 3 | 4 | # Stage changes 5 | git add . 6 | 7 | # Commit 8 | git commit -m "Create README.md" 9 | 10 | # Push 11 | git push -u origin main 12 | -------------------------------------------------------------------------------- /2-exploring-repos/07-git-clone.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Git Clone © 3 | 4 | # Fork the original Codédex repository. Followed by cloning it. 5 | # Make sure to replace "your-github-username" with your actual username for cloning the repository. 6 | git clone https://github.com/your-github-username/github-chapter-2-sandbox.git 7 | -------------------------------------------------------------------------------- /2-exploring-repos/08-branch-out.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Branch Out 🌿 3 | 4 | # Method 1 5 | git branch name-of-new-branch 6 | git checkout name-of-new-branch 7 | 8 | # Method 2 9 | git checkout -b name-of-new-branch 10 | 11 | # Note: Replace `your-github-username` with your actual GitHub username. -------------------------------------------------------------------------------- /2-exploring-repos/09-git-and-teams.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Git & Teams 🧑🤝🧑 3 | 4 | git checkout main 5 | 6 | git pull 7 | 8 | # Alternatively: git pull origin main -------------------------------------------------------------------------------- /2-exploring-repos/10-merges.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Merges ⛙ 3 | 4 | git checkout your-github-username/edit 5 | 6 | git merge main -------------------------------------------------------------------------------- /2-exploring-repos/11-pull-requests.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Pull Requests ↩️ 3 | 4 | # Confirm you're on the `main` branch 5 | git branch 6 | 7 | # Switch into your fork's edit branch 8 | git checkout your-github-username/edit 9 | 10 | # Stage, commit, and push all changes to equivalent branch on remote repo 11 | git add . 12 | git commit -m "message here" 13 | git push -u origin your-github-username/edit 14 | 15 | # At this point, go to https://github.com/your-github-username/github-chapter-2-sandbox/tree/your-github-username/edit to open and merge a pull request -------------------------------------------------------------------------------- /2-exploring-repos/12-yearbook.sh: -------------------------------------------------------------------------------- 1 | # Codédex 2 | # Yearbook 📕 3 | 4 | # Make sure that you've forked from this repository: https://github.com/codedex-io/github-chapter-2-contributions 5 | 6 | # Clone to create local repo 7 | git clone https://github.com/your-github-username/github-chapter-2-contributions.git 8 | 9 | # Use the following commands after making changes 10 | git add . 11 | git commit -m "message here" 12 | git push -u origin main 13 | 14 | # Create a pull request to merge your changes into the `main` branch of the original Codédex repo -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Codédex 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |