Last Updated: 03/09/2012 05:22:00 PM
Create your own custom git command!
This may be old hat for some of you but I stumbled on this today, while looking around in the Git folder. On my windows machine, I opened C:\Program Files\Git\libexec\git-core Some of the files are .exe files others have no file extension. I opened git-pull in notepad++ You may notice it is actually written in shell. Yup. Pull is just a shell script that simplifies using the git plumbing. Apparently you can write git command in just about any language.
So for instance, we have server for demo purposes. All it ever does it pull down code from our private bitbucket repository. I can save keystrokes by creating a custom git command:
- Create a file called git-updatedemo
- It is must start with git-
- don't let it have any file extension
Below is an example of what I did, you can play around with comands that fit your situation.