First install the build dependencies with apt-get build-dep.

sudo apt-get build-dep dolphin

If you haven’t already, install git.

sudo apt install git

Download the repo.

git clone https://github.com/KDE/dolphin.git
cd dolphin

Create a build directory, then run cmake then make. After it finishes compiling, make the dolphin binary executable.

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
make
chmod +x ./bin/dolphin

You can test if everything went well by running:

./bin/dolphin

If it ran okay you can copy the binary to /usr/local/bin.

sudo cp ./bin/dolphin /usr/local/bin/dolphin

Update: I made a video walkthrough for compiling dolphin.