docs: update README
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Second Assignment - Git and Java Basics
|
||||
|
||||
Are you ready to challenge yourself with some algorithmic problems?
|
||||
Let's kick things off by solving three basic problems to refresh your knowledge of *Java* and *Git*.
|
||||
|
||||
## Getting Started
|
||||
@@ -11,6 +10,8 @@ Follow these steps to set up your project:
|
||||
We have recorded a special video, explaining the exact steps that needs to be taken to complete this assignment.
|
||||
Here is the [link]()
|
||||
|
||||
**Make sure to watch the video before starting the assignment.**
|
||||
|
||||
### 1. Fork and Clone the Repository
|
||||
|
||||
First, fork the repository on GitHub or Gitea (click the Fork button on the top-right).
|
||||
@@ -26,10 +27,10 @@ or
|
||||
git clone https://github.com/YOUR_USERNAME/repository-name.git
|
||||
```
|
||||
|
||||
<br/>
|
||||
|
||||
then
|
||||
```
|
||||
# Navigate into the project directory:
|
||||
cd repository-name
|
||||
```
|
||||
|
||||
@@ -52,14 +53,6 @@ If you're behind a firewall or have restricted internet access, configure Maven
|
||||
**For macOS/Linux:**
|
||||
- Location: `~/.m2/settings.xml` (the `.m2` folder is in your home directory)
|
||||
|
||||
**Create the `.m2` folder if it doesn't exist:**
|
||||
```bash
|
||||
# Windows (Command Prompt):
|
||||
mkdir %USERPROFILE%\.m2
|
||||
|
||||
# macOS/Linux:
|
||||
mkdir -p ~/.m2
|
||||
```
|
||||
|
||||
**Place this configuration in `settings.xml`:**
|
||||
|
||||
@@ -111,7 +104,7 @@ git branch
|
||||
- Implement the following methods based on the comments:
|
||||
|
||||
```java
|
||||
// Example method signature you'll find:
|
||||
// Method signature you'll find:
|
||||
public char[][] generateTriangle(int n);
|
||||
public int[] spiralTraversal(int[][] values, int rows, int cols);
|
||||
public int[][] intPartitions(int n);
|
||||
@@ -151,46 +144,23 @@ src
|
||||
**Stage and commit files:**
|
||||
|
||||
```bash
|
||||
# Check which files have changed:
|
||||
git status
|
||||
|
||||
# Stage a specific file:
|
||||
git add src/main/java/MainExercises.java
|
||||
|
||||
# Stage all changed files at once:
|
||||
git add .
|
||||
|
||||
# Commit with a descriptive message:
|
||||
git commit -m "Implement countPartitions method and triangle type checker"
|
||||
|
||||
# Good commit message examples:
|
||||
# - "Complete all main exercises, all tests passing"
|
||||
# - "Add bonus email validation with regex"
|
||||
|
||||
# Bad commit messages (avoid these):
|
||||
# - "Update"
|
||||
# - "Fix stuff"
|
||||
# - "WIP"
|
||||
git commit -m "Implement intPartitions method"
|
||||
```
|
||||
|
||||
**View commit history:**
|
||||
```bash
|
||||
git log --oneline # Shows compact commit history
|
||||
```
|
||||
|
||||
|
||||
## 8. Push to Remote Repository
|
||||
|
||||
```bash
|
||||
# First, ensure you're on the develop branch:
|
||||
git branch # Should show "* develop"
|
||||
|
||||
# Push to remote (note: branch name must match exactly - all lowercase):
|
||||
# Push to remote
|
||||
git push origin develop
|
||||
|
||||
# If this is your first push to develop branch, you might see:
|
||||
# git push --set-upstream origin develop
|
||||
# Just use the command Git suggests
|
||||
```
|
||||
|
||||
## 9. Create a Pull Request to YOUR Own Repository
|
||||
@@ -210,7 +180,7 @@ https://github.com/YOUR_USERNAME/repository-name
|
||||
|
||||
**Step 2: Create a new pull request**
|
||||
- Click on **"Pull requests"** tab (top navigation)
|
||||
- Click the green **"New pull request"** button
|
||||
- Click the **"New pull request"** button
|
||||
|
||||
**Step 3: Configure the pull request branches**
|
||||
```
|
||||
@@ -220,7 +190,7 @@ base: main ←── compare: develop
|
||||
|
||||
**Important settings:**
|
||||
- **base repository:** `YOUR_USERNAME/repository-name` (your fork)
|
||||
- **base branch:** `main` (or `master` depending on your repo)
|
||||
- **base branch:** `main`
|
||||
- **head repository:** `YOUR_USERNAME/repository-name` (same fork)
|
||||
- **compare branch:** `develop`
|
||||
|
||||
@@ -240,7 +210,7 @@ Ready for review and grading!
|
||||
```
|
||||
|
||||
**Step 5: Final submission**
|
||||
- Click **"Create pull request"** (green button)
|
||||
- Click **"Create pull request"**
|
||||
- Share the pull request link with your mentor
|
||||
|
||||
## 10. Mentor Reviews and Grades Your Project
|
||||
|
||||
Reference in New Issue
Block a user