Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
// Tell me the root folder path. | |
// You can also try this one | |
// $home = $_SERVER['DOCUMENT_ROOT']; | |
// Or this | |
// dirname( __FILE__ ) | |
$home = dirname( __FILE__ ); | |
// Is this a Windows host ? If it is, change this line to $windows = true; | |
$windows = false; |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
# add this function to your .bash_profile to be able to use it everywhere | |
# usage: git-ahead-behind [local-branch] [remote-branch] | |
function git-ahead-behind() { | |
branch="`git symbolic-ref --short -q HEAD`"; | |
loc="${1-$branch}"; | |
remote="${2-origin/$loc}"; | |
git fetch $remote &> /dev/null | |
wait | |
# Sync fork with original repository | |
# | |
# Requires an "upstream" remote, pointing to original repo | |
# e.g. `git remote add upstream git@github.com:user/repo.git` | |
alias git-sync-fork="git fetch upstream; git checkout master; git merge upstream/master" |
# Mais usados -- | |
alias ga="git add" | |
alias gc="git commit -m" | |
alias gca="git commit -am" | |
alias gs="git status" | |
alias gp="git push" | |
alias gpl="git pull" | |
# Diff -- | |
alias gd="git diff" |
[user] | |
name = Christopher EnyTC | |
email = chris.enytc@gmail.com | |
[color] | |
ui = true | |
[alias] | |
a = add . | |
c = clone | |
cm = commit -m | |
p = push origin master |