Skip to content

Instantly share code, notes, and snippets.

View addicteduser's full-sized avatar

TinTin Kalaw addicteduser

  • Philippines
View GitHub Profile
@addicteduser
addicteduser / fish_prompt.txt
Last active January 24, 2019 15:54
My preferred custom fish shell prompt
function fish_prompt
printf '%s' (set_color normal) '[' (set_color --bold brgreen) "$USER@$hostname " (set_color normal; set_color green) (echo $PWD | sed -e "s|^$HOME|~|") (set_color normal) ']$ '
end
Looks like:
[USER@HOSTNAME ~/My/current/directory]$ _
where - USER@HOSTNAME has a bright green, boldface format
- ~/My/current/directory has a normal green format
- the rest are normal white
Rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
. : Sync Fork with Main Repository : .
1. git fetch upstream
2. git merge upstream/master
3. git push origin master