Git hints

Cosas para configurar git correctamente

$ git config --global user.illanos "Manuel Gomar"
$ git config --global user.email "illanos@gmail"

Ahora para que coloree los branches en el ~/.bashrc al final añadimos

function current_branch
{
x=$(git branch 2> /dev/null | grep ^* | awk '{print $2}')
if [ ! -z $x ]
then
echo "!$x"
fi
}
function get_dirty
{
x=$(git status 2> /dev/null | grep ^nothing)
if [ -z $x ]
then
echo "*"
fi
}
#PS1='[\u@\[\033[01;32m\]\h\[\033[0m\] \w]\[\033[01;33m\]$(current_branch)\[\033[01;36m\]$(get_dirty)\[\033[0m\] \$ '
PS1='[\u@\[\033[01;32m\]\h\[\033[0m\] \w]\[\033[01;33m\]$(current_branch)\[\033[0m\] \$ '

Finalmente para que nos reconozca, tenemos que validarnos con el servidor

git remote add origin git@direccion

cuidado, en caso de que ya exista … volverla a crear (al menos yo tuve que hacerlo….)
Y ahora nos colorea de forma molona :D

Ficheros de configuracion:

en .git/info/exclude podemos añadir ficheros que no queremos que formen parte de la actualización.

 nano .git/info/exclude 


This entry was posted in Personal and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>