
Great tips for everyones favourite Distributed Source Control Management System. Formerly @agtad (A Git Tip A Day)
.git/objects/
Joined April 2012
- Tweets89
- Following4
- Followers198
- Likes0
Tips for Git retweeted
How many non-merge commits are there in my #git repo?
$ git rev-list --all --count --no-merges
Tips for Git retweeted
git tip of the day: pipe the output of `git archive branch-name` to `tar` to get a copy of the directory of the project without git!
Get a list of filenames changed in your branch, useful for determining tests to run in CI:
gist.github.com/1stvamp/1b24…
Only want to see root commits and merge commits? Give `git log --first-parent` a whirl.
Interest esp. to #bzr users.
1
If like me you've spent any time in *gasp* bzr recently, give git-bzr-ng a go, it makes mirroring between repos easy buff.ly/1cuAPwZ
1
Use vim for your commit editor?
Detect if you're in a commit via the filetype, which is "gitcommit",
see :help filetype :help autocommand
Want to find a merge commit?
git log <oldest commit>..master --ancestry-path --merges
Last one is your merge. Tomorrow we'll revert it!
Tips for Git retweeted
#phpweekly reboot will land by Monday, stay tuned for funs..
Tips for Git retweeted
[blogged] Git Precommit hook awesomeness johnkpaul.com/blog/2013/10/0… @nationjs #nationjs You should do this _now_. /cc @tbwiii @mcwhittemore
Tips for Git retweeted
Replying to @robmil
@robmil @csswizardry @tipsforgit some nice ones there, ill add them to my own collection: gist.github.com/andycole/592…
Tips for Git retweeted
People have been asking me about Git aliases, so I thought I'd post some useful ones: gist.github.com/robmiller/60… /cc @tipsforgit @csswizardry
Rebase every commit of the branch you're currently on, via @robmil:
git rebase -i `git merge-base master HEAD`
Tips for Git retweeted
So I'm planning a massive reboot of @phpweekly, who'd like to help out and be a part of it?
List branches by date:
for k in `git branch|perl -pe s/^..//`;do echo -e `git show $k|head -n 1`\\t$k;done|sort -r
Tips for Git retweeted
For when the internet dies: git config --global alias.serve daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/











