-
Fork the repo
-
Clone forked repo
git clone https://github.com/<your username>/HSE-Course.git
-
Go to the directory
cd HSE-Course
-
Syncronize the fork with the course repo
git remote add upstream https://github.com/morell5/HSE-Course.git
-
Print the current
remote
git remote -v
-
Block
push
to the course repositorygit remote set-url --push upstream no_push
-
Verify the terminal ouput
origin https://github.com/morell0809/HSE-Course.git (fetch) origin https://github.com/morell0809/HSE-Course.git (push) upstream https://github.com/morell5/HSE-Course.git (fetch) upstream no_push (push)
-
Create a branch for the assignment from
master
branchgit checkout -b <task name>
-
Go to problem's directory
Example:
homework/BigInteger
-
Read the problem statement
task.md
-
Write down the solution in files
<task name>.cpp
(implementation)<task name>.h
(interface)
-
Run tests
cmake -G "Unix Makefiles" -B build -S.
cmake --build build
-
Push files to remote repo
git add <task name>.h <task name>.cpp git commit -m "your message" git push
-
After completing the assignment make a
PR
intomaster
-
Run the following command:
git fetch upstream
-
Go to
master
branch on the local repogit checkout master
-
Fetching updates from the course's repo
master
branchgit merge upstream/master master
-
Start to solve new assignment
-
Go to
master
branchgit checkout master
-
Fetch updates from course's repo
git fetch upstream
-
Go to update
master
branchgit reset --hard upstream/master
-
Rewrite update in the
fork
git push -f