How can I pull my course workspace to my local machine?

I finished the ROS Basics in 5 Days (Python) and would like to pull my workspace (both class and ROSject) to my local machine. Is there a way to do this with git?

There are two ways to do this:

1. Download manually.

a. In the IDE, right-click on the catkin_ws/src folder and choose “Download”. This downloads your source files to your PC.
b. From there, you can copy it to your local catkin_ws (or whatever it’s called).
c. You’ll then need to recompile it on you local workspace:

cd [local_ws]
rm -rf build/ devel

PS: You don’t need to copy the build/ and devel/ folders from your workspace on The Construct.

2. Use git.

a. Create a repo where you want to put the course files. It is recommended to use a repository for each course.
b. Create a new git repository in your catkin_ws folder and add your repo in a. above.

cd catkin_ws
git init
git remote origin add [git-repo-url]
git push -u origin [master/main]

c. Clone the repo in a. to your local workspace

cd [local_ws]
git clone [git-repo-url] .   # Please notice the dot after the repo url
1 Like

Thanks for the detailed response!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.