Skip to content

Instantly share code, notes, and snippets.

View endrureza's full-sized avatar
🎯
Focusing

Endru Reza endrureza

🎯
Focusing
View GitHub Profile
@endrureza
endrureza / removeJobsRedisDriver.php
Created June 23, 2019 17:52 — forked from derhansen/removeJobsRedisDriver.php
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
@endrureza
endrureza / git_empty_branch
Created June 6, 2019 10:35 — forked from j8/git_empty_branch
Create new branch with empty folder structure
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: