This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 7: Add robot actions!

git push

face Josiah Wang

If you have not yet done so, add and commit your latest changes to your repo!

Now, your latest changes are all local.

Remember that you now have a remote repository on GitLab!

So you should probably keep your changes in sync with the remote version!

Let us push your changes upstream to your remote repo.

This step is easy. Just say git push! It will push your current branch to the equivalent branch on the remote repo.

user@MACHINE:~/robot$ git push
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 2.63 KiB | 158.00 KiB/s, done.
Total 9 (delta 3), reused 0 (delta 0), pack-reused 0
To https://gitlab.doc.ic.ac.uk/username/70053-robot.git
   75d1feb..61f8557  main -> main

You might get an error if there is a conflict, for example someone might have pushed a newer update that you do not yet have locally. Try a git pull first which will merge any remote changes to your local changes, and then git push again.

If there is still a conflict, it will likely be because someone has edited the same file as you and has made changes that cannot be automatically merged with yours. In this case, you will have to manually rectify this somehow - good luck! 😊