Forking creates your own copy of this repository where you can work on your project independently.
Forking is like making your own personal copy of someone else's project. You can make changes to your copy without affecting the original repository.
-
Navigate to the repository page on GitHub
-
Click the "Fork" button in the top-right corner of the page
-
Select your account as the destination for the fork
-
Wait for GitHub to create your fork (this takes a few seconds)
Once you've forked the repository, you need to download it to your computer:
# Replace <your-username> with your GitHub username
git clone https://github.com/<your-username>/java-bootcamp.git
# Navigate into the directory
cd java-bootcampIf you haven't used Git before, configure your identity:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"This allows you to pull in updates from the main repository:
# Add the original repo as a remote called "upstream"
git remote add upstream https://github.com/WCC-ORG/java-bootcamp.git
# Verify the remotes
git remote -vYou should see:
origin https://github.com/<your-username>/java-bootcamp.git (fetch)
origin https://github.com/<your-username>/java-bootcamp.git (push)
upstream https://github.com/WCC-ORG/java-bootcamp.git (fetch)
upstream https://github.com/WCC-ORG/java-bootcamp.git (push)
To get the latest changes from the original repository:
# Fetch the latest changes from upstream
git fetch upstream
# Switch to your main branch
git checkout main
# Merge upstream changes
git merge upstream/main
# Push updates to your fork
git push origin main# Create your participant directory
mkdir -p participants/<your-name>/project
# Navigate to your project folder
cd participants/<your-name>/project# Create and switch to a new branch
git checkout -b my-project-development
# Start coding!Save your progress regularly with commits:
# Check what files have changed
git status
# Add files to staging
git add .
# Or add specific files
git add participants/<your-name>/project/src/Main.java
# Commit with a descriptive message
git commit -m "Add initial project structure"
# Push to your fork
git push origin my-project-developmentWhen you're ready to submit, follow the How to Submit Guide.
A: Forking creates a copy on GitHub (online), while cloning downloads a repository to your computer.
A: You can only have one fork of a repository per GitHub account, but you can delete and re-fork if needed.
A: No! Your fork is completely independent. Changes only go to the original if you submit a Pull Request and it's accepted.
A: Yes! You can delete your fork and fork again, or create a new branch to start fresh.
Make sure you're pushing to your fork, not the original repository:
git remote -v # Check your remotesIf you have conflicts:
git fetch upstream
git checkout main
git merge upstream/main
# Resolve conflicts in your editor
git add .
git commit -m "Resolve merge conflicts"
git push origin mainNext Step: Once you've forked and cloned the repository, check out the Project Ideas to choose what to build!
