Skip to content

jubianchi/dotfiles

Repository files navigation

dotfiles

ZSH Theme

This theme is highly inspired by jeremyFreeAgent's Powerline theme and by agnoster's one

Here is a quick demo of this theme : http://ascii.io/a/1774

In this repository, you'll find my ZSH theme. This theme is really cutomizable as I use it in different environments (Ubuntu, OS X, Desktop, Server). The only things that are not easilly customizable at the moment are the segment colors.

How to use

To use this theme, you'll need to install Oh My ZSH and put the content of this repository in your home directory. Then restart your terminal session and everything shold be OK.

How to customize

There are several things to customize in this theme :

You can also define your own component and add them to your prompt :

  • A component is a simple function with a name beginning with prompt_
  • It takes at least one argument which is a callback to the segment renderer function (this is needed to be able to put the segment at the right or left prompt)

Check out examples in the theme file

Supported tools

  • PHP
  • Vagrant
  • Git
  • Screen

gitconfig

Install

$ git clone git://github.com/jubianchi/gitconfig.git gitconfig
$ mv gitconfig/* $HOME

$ git config --global user.name <your-username>
$ git config --global user.email <your-email>

$ git config --global github.user <your-github-username>
$ git config --global github.password <your-github-password>

$ git aliases

Example

$ mkdir my-repository
$ git cl ghs:me/my-repository php
$ git go new-feature

# On branch new-feature
# Commit, commit, commit...
# Sleep

$ git pullor master

# Commit, commit, commit...

$ git finish master

# Reorder, squash...
# On branch master

$ git pullor master
$ git pushor master

URLs

ghs:

Alias for Github clone URL (SSH protocol) :

$ git clone ghs:jubianchi/atoum
# Shortcut for git clone git@github.com:jubianchi/atoum

gh:

Alias for Github clone URL (Git readonly protocol) :

$ git clone gh:jubianchi/atoum
# Shortcut for git clone git://github.com/jubianchi/atoum

gists:

Alias for Gist clone URL (SSH protocol) :

$ git clone gists:a52e82e9ccc25449c325.git
# Shortcut for git clone git@gist.github.com:a52e82e9ccc25449c325.git

bbs:

Alias for BitBucket clone URL (SSH protocol) :

$ git clone bbs:jubianchi/atoum
# Shortcut for git clone git@bitbucket.org:jubianchi/atoum

bb:

Alias for BitBucket clone URL (HTTPS readonly protocol) :

$ git clone bb:jubianchi/atoum
# Shortcut for git clone https://bitbucket.org/jubianchi/atoum

Commands

Repository

git cleanup

Cleans up the repository by pruning remote, running GC and clearing stash

$ git cleanup [<remote>] (Default: origin)
git ignore

Adds an entry to the .gitignore file

$ git ignore <entry>
git make

Create a new empty repository with an empty initial commit. This alias lets you chosse a template to init your repository (one of php, default)

$ git make [<initial-commit-message>] (Default: Initial commit) [<template>]
git cl

Clones a remote repository and lets you choose a template (one of php, default).

$ git cl <url> [<template>]

Configuration

git aliases

Lists all available aliases

$ git aliases

Staging

git addall

Adds all files that are not staged and displays a light status

$ git addall
git patch

Alias for git add --patch

$ git patch
git unadd

Unstages file

$ git unadd <file[, file, …]>

Commit

git amend

Amends the last commits keeping its original message

Alias for git commit --amend -C HEAD

$ git amend
git cp

Cherry-picks a commit and edit message

Alias for git cherry-pick -ex

$ git cp <sha1>
git undo

Resets the last commit keeping the modifications (soft reset) and displays a light status

$ git undo

Branching

git br(?:|a|r|n)

Displays branches list

Aliases for git branch

# Displays local branches
$ git br
# Displays all branches  (local + remote)	
$ git bra
# Displays remote branches
$ git brr
# Displays all (local + remote) not merged branches
$ git brn
git cb

Checkout a new branch

Aliases for git checkout -b

$ git cb <branch>
git pwd

Displays the name of the current branch

$ git pwd

Workflow

git (?:develop|master)

Checkout the develop or master branch

Aliases for git checkout

$ git master
$ git develop

You could have one alias for each long running branch in your repositories configuration file

git go

Creates (if it does not exist) and checkout a branch

$ git go <branch>
git finish

Finishes the current topic branch by interactively rebasing its commits and merging it into another branch

$ git finish <branch>
git wip

Starts a WIP branch saving the current moidifications to a new commit and gets you back to your working branch.

$ git wip <branch>

Status

git dc?

Aliases for git diff to bypass pager caveat

$ git d
# Alias for git diff --cached
$ git dc 
git stat

Displays current diff stats

Alias git diff --stat

$ git stat
git st

Displays an interactive status screen

Alias for git status using tig

$ git st
git ls

Displays a light status

$ git ls

Remote

Pulls will be automatically rebased when using these aliases

git (?:fetch|pull|push)(?:or|up)

Runs actions on remotes :

  • or : origin
  • up : upstream

Aliases for git (?:fetch|pull|push)

$ git fetchor
$ git fetchup

$ git pullor [<branch>]
$ git pullup [<branch>]

$ git pushor [<branch>]
$ git pushup [<branch>]
git rp

Pulls a remote branch and automatically rebase

Alias for git pull --rebase

$ git rp <remote> [<branch>]
git radd

Adds a new remote

Alias for git remote add

$ git radd <name> <url>
	```

#### Log

##### git l

Alias for ```git log``` to bypass pager caveat

```sh
$ git l
git graph

Displays a nice formatted graph

Alias for git log

$ git graph

Utilities

git (?:g|k|t)

Runs usefull git utilities :

  • g : Alias for git gui
  • k : Alias for gitk
  • t : Alias for tig

Check out Tig homepage

$ git g
$ git k
$ git t
git gist

Lets you quickly build a Gist

Check out git-gist homepage

$ git gist

PFlow

Check out PFlow homepage

$ git feature <start|sync|finish|...>
$ git fstart
$ git fsync
$ git ffinish
$ git fpublish

Github

If you work a lot with Github, check out defunkt/hub which is a great tool integrating Github's features to git

About

Some of my dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published