[categories] [index] [all (531)] [latest]
# Exclude the build directory
build/*
# Exclude temp nibs and swap files
*~.nib
*.swp
# Exclude OS X folder attributes
.DS_Store
# Exclude user-specific Xcode 3 and 4 files
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
xcuserdata
$ git add -u
$ git log --format='%aN' | sort -u
$ git shortlog -n -s
$ git push --delete origin MY_TAG
$ git commit --amend -m "new message"
Works with GitHub:
$ git pull
$ git tag -d THE_TAG
$ git push origin :refs/tags/THE_TAG
$ git tag THE_TAG
$ git push origin THE_TAG
Add an alias to display pretty logs
$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
Display pretty logs
$ git lg
Display the lines that changed
$ git lg -p
git tag -d TAG_NAME
delete remote tag 'TAG_NAME'
git push origin :refs/tags/TAG_NAME
or
git push --delete origin TAG_NAME
git tag -d TAG_NAME
$ git reset --hard
#!/usr/bin/sh
ORIGIN=$HOME'/Dropbox/dropbox.git'
CLONE=$HOME'/Projects/dropbox'
mkdir -p "$ORIGIN"
cd "$ORIGIN"
git init --bare
git clone "$ORIGIN" "$CLONE"
cd "$CLONE"
touch test.txt
git add test.txt
git commit -m "Initial commit"
git push origin master
$ echo 'opendiff "$2" "$5" -merge "$5"' > ~/bin/opendiff-git.sh
$ chmod a+x ~/bin/opendiff-git.sh
$ git config --global diff.external ~/bin/opendiff-git.sh
Now, git diff
should open FileMerge:
$ git diff