-
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
remotegit remote -v -
Block
pushto 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
masterbranchgit 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
PRintomaster
-
Run the following command:
git fetch upstream -
Go to
masterbranch on the local repogit checkout master -
Fetching updates from the course's repo
masterbranchgit merge upstream/master master -
Start to solve new assignment
-
Go to
masterbranchgit checkout master -
Fetch updates from course's repo
git fetch upstream -
Go to update
masterbranchgit reset --hard upstream/master -
Rewrite update in the
forkgit push -f