Skip to content

Instantly share code, notes, and snippets.

View johnjimysom's full-sized avatar
🤡
learning new things everyday

John-Jimi Som johnjimysom

🤡
learning new things everyday
View GitHub Profile
@AmrEldib
AmrEldib / git.lua
Created February 29, 2016 05:33
Customize Windows Cmder Prompt
---
-- Find out current branch
-- @return {false|git branch name}
---
function get_git_branch()
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("%* (.+)$")
if m then
return m
end