Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Submit MakiSonomura's first 3 tasks #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
531 changes: 531 additions & 0 deletions members/MakiSonomura/notes/CLI.md

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions members/MakiSonomura/notes/GIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Git

**Git** is a free, open-source, distributed version control system that developers use to track changes in source code during software development. Created by Linus Torvalds in 2005, Git allows developers to collaborate on projects, maintain a history of code changes, and revert to previous versions if needed. It’s widely used in both small and large development projects, from personal coding projects to large-scale software development across multiple teams.

Git’s distributed model allows every developer to have a local copy (or "clone") of the entire codebase, including its full history, so they can work offline and synchronize changes with a central repository when they’re ready.

## Common Git Usage

### 1. **Initial Setup**
```bash
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
```
Configures your name and email for commits.

### 2. **Creating a Repository**
```bash
git init
```
Initializes a new Git repository in the current directory.

### 3. **Cloning a Repository**
```bash
git clone <repository_url>
```
Creates a local copy of a remote repository.

### 4. **Checking Repository Status**
```bash
git status
```
Shows the current status of the working directory and staging area, such as modified, staged, or untracked files.

### 5. **Adding Changes to Staging**
```bash
git add <file> # Add a specific file
git add . # Add all changes in the current directory
```
Moves files from the working directory to the staging area in preparation for a commit.

### 6. **Committing Changes**
```bash
git commit -m "Commit message here"
```
Saves the changes from the staging area to the repository with a descriptive message.

### 7. **Viewing Commit History**
```bash
git log
```
Shows a list of past commits, each with its unique commit ID, author, date, and message.

### 8. **Pushing Changes to a Remote Repository**
```bash
git push origin <branch_name>
```
Uploads local changes to a remote repository.

### 9. **Pulling Changes from a Remote Repository**
```bash
git pull origin <branch_name>
```
Downloads changes from a remote repository and merges them into the local branch.

### 10. **Branching**
```bash
git branch <branch_name> # Creates a new branch
git checkout <branch_name> # Switches to the specified branch
```
Branching allows developers to work on new features or fixes without disturbing the main codebase.

### 11. **Merging Branches**
```bash
git checkout <target_branch>
git merge <source_branch>
```
Combines changes from one branch into another.

### 12. **Resolving Merge Conflicts**
If there are conflicts when merging, Git will indicate which files are in conflict. Open the files, manually resolve conflicts, then add and commit the resolved files.

### 13. **Reverting Changes**
```bash
git revert <commit_id>
```
Creates a new commit that undoes the changes of a previous commit, keeping history intact.

### 14. **Undoing Local Changes**
```bash
git checkout -- <file> # Reverts uncommitted changes to the last commit
git reset <file> # Unstages a file from the staging area
```

### Summary

Git commands are structured for tracking changes efficiently, making collaboration smoother, and giving full control over version history. Understanding and using these common commands will streamline your development workflow and make managing codebases more efficient.




### Typical Workflow with Git
Next I will introduce you to a typical Git workflow


### 1. **Fork the Repository**
1. Go to the repository you want to contribute to on GitHub.
2. Click on the **Fork** button at the top right of the page. This will create a copy of the repository in your own GitHub account.
<!-- ![alt text](assets/fork.png) -->
![alt text](assets/fork.png)

### Step 2: **Clone the Forked Repository**
Download a local copy of your forked repository so you can start making changes:
```bash
git clone <your_forked_repo_url>
cd <repository_name>
```
![alt text](assets/clone.png)

### Step 3: **Create a New Branch for Your Changes**
Create a branch to isolate your changes. Name it descriptively, such as
`member/helloworld`
```bash
git checkout -b <feature-branch-name>
```
### Step 4: **Make Changes Locally**
Make the necessary code changes or additions in your working directory. After making changes, check which files have been modified:
![alt text](assets/status.png)

### Step 5: **Stage and Commit Your Changes**
Add the files you want to include in your commit:
```bash
git add <file-name> # Add specific file
git add . # Add all changes in directory
```
Then commit with a descriptive message:
```bash
git commit -m "Brief description of changes"
```
![alt text](assets/commit.png)
### Step 6: **Push Your Branch to Your Fork on GitHub**
Push your branch to the forked repository on GitHub:
```bash
git push origin <feature-branch-name>
```
### Step 7: **Open a Pull Request (PR)**
- Go to your forked repository on GitHub.
- You should see an option to Compare & pull request for the recently pushed branch. Click on it.
- Add a descriptive title and a summary of your changes.
- Select the correct branch from the original repository (usually main or master) to compare against.
- Submit the Pull Request for review.
![alt text](assets/pr.png)
### Step 8: **Wait**
If the authors recognizes your post, just wait for them to merge it, otherwise you can keep modifying it until it's merged.
63 changes: 63 additions & 0 deletions members/MakiSonomura/notes/IDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# IDE and Environments


### 1. **Windows Terminal**

If you're not planning to use `Windows`, feel free to skip this. However, we do recommend giving it a shot! Modern Windows versions have greatly enhanced development capabilities, moving past the stereotypes of older versions. You can find the tutorial on [Install Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/install)

### 2. **Visual Studio Code**


You can find all installers on [Download Visual Studio Code](https://code.visualstudio.com/download)
#### Windows
![alt text](assets/vscode.png)

#### Linux and macOS




### 3. **Install WSL**

[Install Ubuntu on WSL2](https://documentation.ubuntu.com/wsl/en/latest/guides/install-ubuntu-wsl2/)




### 4. **Development Environment**


<!-- #### 1. **Install Development Toolkits** -->
#### 1. **Clang/LLVM**
If you don't intend to develop LLVM, it's sufficient to install a newer, more stable version. We recommend you to install it from LLVM's download page: [LLVM Debian/Ubuntu nightly packages](https://apt.llvm.org/)
```bash
# For convenience there is an automatic installation script available that installs LLVM for you.
To install the latest stable version:
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"

# To install a specific version of LLVM:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number>
To install all apt.llvm.org packages at once:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number> all
# or
sudo ./llvm.sh all

```
After installation, you can run
```bash
clang-${verison} -v
llvm-config-${version} --verion
```
![alt text](assets/llvm.png)
#### 2. **Rust**
`Rustup` is the official toolchain version manager for managing versions and targets in your host. To install it and `Rust`, you can find [Install Rust](https://www.rust-lang.org/tools/install)


#### 3. **Sui**

- The official guide to install `Sui`: [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install)
- Similar to `Rustup`, I've developed `Suiup` to manage the versions of `Sui`, and you can try it out [here](https://github.com/MakiSonomura/suiup). After you install it successfully, you can see: ![alt text](assets/suiup.png)
Binary file added members/MakiSonomura/notes/assets/clone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/fork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/llvm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/pr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/suiup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added members/MakiSonomura/notes/assets/vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.