Alias | Command | What to Type |
---|---|---|
git cm |
git commit |
git config --global alias.cm commit |
git co |
git checkout |
git config --global alias.co checkout |
git ac |
git add . -A git commit |
git config --global alias.ac '!git add -A & & git commit' |
git st |
git status -sb |
git config --global alias.st 'status -sb' |
git tags |
git tag -l |
git config --global alias.tags 'tag -l' |
git branches |
git branch -a |
git config --global alias.branches 'branch -a' |
git remotes |
git remote -v |
git config --global alias.remotes 'remote -v' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global core.editor "subl -w" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\[\e[0;36m\]\u\[\e[m\]\[\e[0;32m\]@\h:\[\e[m\]\[\e[0;33m\]\w\[\e[m\]${text}$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap josegonzalez/php | |
brew tap homebrew/dupes | |
brew install ghostscript | |
brew install php54-imagick | |
# create symlink for ghostscript in the /usr/bin directory | |
sudo ln -s /usr/local/bin/gs /usr/bin/gs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
GIT_WORK_TREE=/path/to/host/example.com/ git checkout -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer 8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// 1. All configuration goes here. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options: { | |
style: 'compressed' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class BaseHandler { | |
protected $templateVariables; | |
public function __construct() { | |
$this->templateVariables = array( | |
'base_url' => BASE_URL | |
); | |
} |
source zuha/Zuha
When you first start working with git you typically pay no attention to the size of the repo. You commit anything and everything. Then at some point you start to realize that your repo is huge. (Our was pushing 2 gigabytes)
In order to reduce it at this future point, and keep the history here is the simplest way. Noting that we only want to keep a single branch - the master - in our case. No tags, no remote or local branches, and when we're done every one who wants to collaborate will need to delete their local repos and pull a new clone.
Therefore, this should only be done when all branches are synced, so that they can be reduced to a single master branch on both the remote repo and locally. There should be no tags.
git clone <GIT REPO URL> <DIRECTORY>
Clone a clean version of the repository.
NewerOlder