Tips for Git (@tipsforgit) profile picture

Great tips for everyones favourite Distributed Source Control Management System. Formerly @agtad (A Git Tip A Day)

.git/objects/
Joined April 2012
Replying to @jpaulreed
@jpaulreed omg, I was a massive DHBIT fan too (used to stay up till 4-6am in the UK for live shows/irc), now makes sense why I loved @ShipShowPodcast so much :D
1
Tips for Git retweeted
How many non-merge commits are there in my #git repo? $ git rev-list --all --count --no-merges
1
4
17
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!
3
32
2
87
Only want to see root commits and merge commits? Give `git log --first-parent` a whirl. Interest esp. to #bzr users.
1
Tips for Git retweeted
git debugging flowchart
37
1,015
6
1,187
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
Given a merge commit hash, you can revert it like so: git revert -m 1 <commit hash>
1
2
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
#git daemon tutorial to quickly share repository in LAN l.rw.rw/git-daemon /cc @gittips @tipsforgit
Replying to @robmil
@robmil excellent, thanks for that, and retweeted, natch. ;)
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?
1
1
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