Updating, testing branches and recompiling

Is there any significant problems from just pulling updates or a different branch for testing and just compiling it on top of the last version? Or would doing this not work, risking getting weird bugs?

If not advisable, what is the preferred method for testing changes (including the ones that change c++ code) from other branches/PR’s? Looking for an alternative that saves me from deleting and recloning on top of the ~15 minutes it takes me to compile.

git branches are completely independent of each other. As long as you do a make clean to get rid of old code artifacts before compiling the new code, you can have multiple branches under the same repository.

Your workflow should be something like:
1 git clone the initial repository
2 git remote add any other repositories you want to track
3 git checkout the branch you want to work on
4 make your changes
5 make clean and recompile to test your changes
6 git add and git commit to commit your changes
7 git push to share them with the world

You should only need to do step 1 once. You need to do step 2 for each repository you want to track, step 3 every time you want to work on a different branch, and steps 4-7 as often as necessary.

1 Like

Thanks a lot! make clean really escaped me.