Skip to content

Instantly share code, notes, and snippets.

View LB--'s full-sized avatar

LB--

  • Clickteam
View GitHub Profile

There are two common workflows - 'merge based workflow' and 'rebase workflow'.

In the former, you use git merge to merge in changes which creates merge commits (commits with multiple parents). People who like preserving history tend to prefer merge based workflow. I personally like to use git merge --no-ff --no-commit, which allows git to do what it can to automatically make the merge but then lets me inspect the files before concluding the merge - I do this to ensure that every commit compiles. There are cases where git can automatically merge two compiling commits into one that doesn't compile (e.g. one branch removed an unused variable and the other branch added code that uses that variable - no conflict because different lines were changed, and each branch compiles, but the automatic merge does not compile).

The latter workflow is typically used by people who like a clean commit graph. Generally this is because they use tools that visually represent the commit graph to them and merge-based workflows

@LB--
LB-- / CMakeLists.txt
Created March 30, 2016 15:12
CMake Boost Example
cmake_minimum_required(VERSION 3.4)
project(boost-example
VERSION 0.0.0
LANGUAGES
CXX
)
find_package(Boost 1.60 REQUIRED
COMPONENTS
Test project C:/Users/LB/Code/Magnum/build/Magnum-prefix/src/Magnum-build
Start 1: MathAlgorithmsGaussJordanTest
1/131 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.02 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/131 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.02 sec
Start 3: MathAlgorithmsSvdTest
3/131 Test #3: MathAlgorithmsSvdTest ................. Passed 0.02 sec
Start 4: MathGeometryDistanceTest
4/131 Test #4: MathGeometryDistanceTest .............. Passed 0.02 sec
Start 5: MathGeometryIntersectionTest
Test project C:/Users/LB/Code/Magnum/build/Magnum-prefix/src/Magnum-build
Start 1: MathAlgorithmsGaussJordanTest
1/131 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.01 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/131 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.01 sec
Start 3: MathAlgorithmsSvdTest
3/131 Test #3: MathAlgorithmsSvdTest ................. Passed 0.01 sec
Start 4: MathGeometryDistanceTest
4/131 Test #4: MathGeometryDistanceTest .............. Passed 0.01 sec
Start 5: MathGeometryIntersectionTest
cmake_minimum_required(VERSION 3.1)
project(nuwen-hello)
add_executable(hello hello.cpp)
set_property(TARGET hello PROPERTY CXX_STANDARD 14)
Test project C:/Users/LB/Code/Magnum/build/Magnum-prefix/src/Magnum-build
Start 1: MathAlgorithmsGaussJordanTest
1/131 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.01 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/131 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.01 sec
Start 3: MathAlgorithmsSvdTest
3/131 Test #3: MathAlgorithmsSvdTest ................. Passed 0.01 sec
Start 4: MathGeometryDistanceTest
4/131 Test #4: MathGeometryDistanceTest .............. Passed 0.02 sec
Start 5: MathGeometryIntersectionTest
Test project C:/Users/LB/Code/Magnum/build/Magnum-prefix/src/Magnum-build
Start 1: MathAlgorithmsGaussJordanTest
1/129 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.04 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/129 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.02 sec
Start 3: MathAlgorithmsSvdTest
3/129 Test #3: MathAlgorithmsSvdTest ................. Passed 0.02 sec
Start 4: MathGeometryDistanceTest
4/129 Test #4: MathGeometryDistanceTest .............. Passed 0.02 sec
Start 5: MathGeometryIntersectionTest
@LB--
LB-- / CMakeLists.txt
Last active August 11, 2019 17:17
CMake Bootstrap
cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
ExternalProject_Add(CMake
GIT_REPOSITORY "git://github.com/Kitware/CMake.git"
# GIT_TAG "next"
CMAKE_ARGS
"-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_LIST_DIR}/install"
# "-DBUILD_SHARED_LIBS=OFF"
TEST_EXCLUDE_FROM_MAIN 1
@LB--
LB-- / simple-platformer-abc22bf.txt
Created October 27, 2015 03:24
CMake ExternalProject is awesome.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/LB/GitHub/simple-platformer/build
[ 2%] Performing update step for 'Corrade'
From git://github.com/mosra/corrade
bb712cd..24ad3fa master -> origin/master
First, rewinding head to replay your work on top of it...
Fast-forwarded master to origin/master.
[ 5%] Performing configure step for 'Corrade'
-- Configuring done
Test project C:/Users/LB/GitHub/magnum/build
Start 1: MathAlgorithmsGaussJordanTest
1/129 Test #1: MathAlgorithmsGaussJordanTest ......... Passed 0.18 sec
Start 2: MathAlgorithmsGramSchmidtTest
2/129 Test #2: MathAlgorithmsGramSchmidtTest ......... Passed 0.04 sec
Start 3: MathAlgorithmsSvdTest
3/129 Test #3: MathAlgorithmsSvdTest ................. Passed 0.04 sec
Start 4: MathGeometryDistanceTest
4/129 Test #4: MathGeometryDistanceTest .............. Passed 0.05 sec
Start 5: MathGeometryIntersectionTest