- Add to $PATH variable folder with git related scripts
$ export PATH=$PATH:/d/MyProjects/GitHub/scripts
- To have command like:
$ git <mycommand>
you should create script with the next naming convention
<repository> | |
<id>jboss-public-repository-group</id> | |
<name>JBoss Public Maven Repository Group</name> | |
<url>http://repository.jboss.com/maven2</url> | |
</repository> | |
<repository> | |
<id>repo2_maven_org</id> | |
<url>http://repo2.maven.org/maven2</url> | |
</repository> | |
<repository> |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.gordondickens.sample</groupId> | |
<artifactId>sample-parent</artifactId> | |
<version>1.0.0</version> | |
<packaging>pom</packaging> |
cmd /C jruby "$(FULL_CURRENT_PATH)" & pause | |
cmd /K jruby "$(FULL_CURRENT_PATH)" |
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2 | |
$ touch README.md | |
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2 | |
$ git init | |
Initialized empty Git repository in D:/MyProjects/GitHub/gitflow_test2/.git/ | |
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2 (master) | |
$ git add README.md |
$ export PATH=$PATH:/d/MyProjects/GitHub/scripts
$ git <mycommand>
you should create script with the next naming convention
$ echo -e "\033[31mCompiling foo.c\033[0m \033[33mCompiling foo.c\033[0m" |
$ git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 |
$ git status --untracked-files=all -s | grep "^??" | cut -c 4- | while read line; do dos2unix -D "${line}"; done |
MSYS: alias resets upon restarting MSYS console
Change to user directory:
cd ~
Append to .profile (which will run upon every new bash session):
echo -e "\nalias <myalias>=\"<custom command>"" >> .profile