There are tons of articles describing how you can rewrite history with git, but they do not answer "why should I do it?".
A similar question is "what are the tradeoffs / how do I apply this in my distributed workflow?".
Also, git developers strongly encourage/command you to write commit message in imperative present tense, but do not say why. So, why?
I'll try to answer these to the best of my abilities, largely based on how I see things. I won't get too detailed (there are enough manuals and tutorials for the exact concepts and commands).
::Read more
posted on Saturday, 05 Mar 2011 18:27 - link - tags: foss, git - path: / - 7 comments
When cleaning up a system and going over git repositories I often wonder if a git repo contains any interesting, but unpushed work. (i.e. "unique" content)
I heard bzr (or was it hg...) can do it out-of-the-box, but I couldn't find any existing solution for git.
So I wrote a script to do this. It checks a repo for unique commits, tags, branches, dirty files/index, added files, or stashed states. In comparison to a specific remote, or all of them, and uses an appropriate exitcode.
git-remote-in-sync.sh
The script is part of a bigger git-scripts repo (most of the scripts written by random people). Although the original repo creator hasn't gotten back to me this seems like a good starting point to have some sense of order in the wildspread of git scripts.
Here are some other scripts I find pretty useful:
::Read more
posted on Thursday, 16 Dec 2010 18:06 - link - tags: git - path: / - 0 comments