This repository is created for 42Campus students to have the same environment as in campus PCs. The goal is to make remote work as seamless and productive as possible.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Docker
- Intall vscode plugin:
Download related files, build image and run up container (only need to do this at the first time or Dockerfile update):
bash -c "$(curl -fsSL https://raw.githubusercontent.com/LeaYeh/42-Docker-DevEnv/master/run.sh)"
Attech the container to new vscode window.
We welcome contributions from our peers. If you have improvements or features you'd like to add, please follow these steps:
Fork and create a new feature branch.
> git checkout -b feat-<NAME>
After your work, checkout back to the main branch and update to the latest version again. Then checkout to the feature branch and rebase with main branch.
> git checkout main
> git pull
> git checkout feat-<NAME>
> git rebase main
No conflicts happend! Go to the Step 3.
Conflicts occured when rebasing...
-
First, git will pause the rebase and allow you to fix the conflict. You can see which files contain conflicts by running
git status
. -
Open the file with conflicts. Git marks conflicts in the source code with
<<<<<<<
,=======
, and>>>>>>>
. The code between<<<<<<<
and=======
are your local changes and the code between=======
and>>>>>>>
are the incoming changes. You need to manually edit the file to resolve the conflict. -
After you've resolved the conflict, you need to add the resolved files to the staging area and continue the rebase process.
> git add <filename>
> git rebase --continue
Push the feature branch to the remote repository branch.
PS: Because we use rebase
to change the history, it's necessary to force push.
> git push origin feat-<NAME> --force
Make a pull request on GitHub and wait for the review.