Foreword:
Sometimes you need to edit PATH variable.
Of course you edit .bash_profile, .bashrc, .profile or other scripts and this works fine only in terminal.
GUI apps at Mac Os use its own PATH variable (moreover has its own environment), which can be set using ‘launchctl setenv PATH <PATH_VALUE>’.
So you need to setup PATH for GUI apps correctly, and do not forget about PATH var for terminal.
Moreover, after update to Mac Os X 10.
There is some usefull git command rerere (reuse recorded resolution). Sometimes especially for long lived branch you need to resolve same conflicts again and again. This command let you save the results of conflict resolution and apply it again when needed.
Let see how its works:
# create test repo git init rerere # move to it cd rerere # enable rerere - reuse recorded resolution (its disabled by default) git config rerere.
Sometimes you need to build .net solution/project on different platforms (for example while developing xamarin based application). In that case pre/post build events may contain platform specific instructions.
To handle this situation you can use ‘Condition’ attribute and ‘OS’ variable, for example, like this:
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' "> <!--windows specifics --> copy $(TargetPath) $(ProjectDir)../Assemblies /Y </PostBuildEvent> <PostBuildEvent Condition=" '$(OS)' == 'Unix' "> <!--*nix, mac specifics --> cp -f $(TargetPath) $(ProjectDir).
Here are some usefull git aliases which i use on a daily basis:
Output samples are generated using clojure repository
List of one line commits
ls = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' List of commits with changed files
ll = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --decorate --numstat List of commits without colors
lnc = log --pretty=format:"%h\\ %s\\ [%cn]" Commits with dates
ldt = log --all --pretty=format:'%Cred%h%Creset %Cgreen%ad%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' Commits with short dates
Some time ago i wrote gist which described how to install ghc from source on ubuntu. Today i see question on stackoverflow.com connected with my gist. I have fixed gist immediately and think about leaving comment to person who had some difficulties with it. I log on using google account and try to leave comment and … i cant do it because my repuration is too low (this is just new account).