Typical workflow - RobotTeaching/COMP4034 GitHub Wiki

Create a fresh workspace

  1. decide where you want your workspace, e.g. in ~/COMP4034_ws
  2. create the workspace and the src/ directory within in one go: mkdir -p ~/COMP4034_ws/src
  3. go to the source directory: cd ~/COMP4034_ws/src
  4. update system sudo apt-get update && sudo apt-get upgrade
  5. install all dependencies: rosdep install --from-paths . -i -y
  6. clone any repository you want: git clone https://github.com/YOURNAME/CMP4034.git
  7. go to your local cloned repository (cd ~/CMP9767M_ws/src/CMP4034) and configure git:
    1. git config credential.helper cache (avoids retyping password again and again)
    2. git config user.name "YOUR NAME"
    3. git config user.email "YOUR EMAIL" (replace with your ID)
  8. go to the top-level dir of the workspace: cd ~/CMP4034_ws and invoke catkin_make
  9. source the workspace: source devel/setup.bash

Update from upstream

  1. go to the checked out source dir: cd ~/COMP4034_ws/src/COMP4034
  2. add the upstream remote git remote add upstream https://github.com/<YOUR_REPO>.git
  3. update from upstream: git pull upstream master

Create a branch from master

  1. make sure you are on master: git checkout master
  2. create a new feature branch: git checkout -b NEW_FEATURE (replace NEW_FEATURE with a meaningful name)
  3. do some work and make commits...
  4. push the new branch to your GitHub repository: git push -u origin NEW_FEATURE
⚠️ **GitHub.com Fallback** ⚠️