What is a dangling commit and a blob in a Git repository and where do they come from?

During the course of working with your Git repository, you may end up backing out of operations, and making other moves that cause intermediary blobs, and even some things that Git does for you to help avoid loss of information. Eventually (conditionally, according to the git gc man page) it will perform garbage collection and … Read more

How to ‘git commit’ a single file/directory

Your arguments are in the wrong order. Try git commit -m ‘my notes’ path/to/my/file.ext, or if you want to be more explicit, git commit -m ‘my notes’ — path/to/my/file.ext. Incidentally, Git v1.5.2.1 is 4.5 years old. You may want to update to a newer version (1.7.8.3 is the current release).

How to amend several commits in Git to change author

Warning: now deprecated in favor of filter-repo. Rebase/amend seems inefficient, when you have the power of filter-branch at your fingertips: git filter-branch –env-filter ‘if [ “$GIT_AUTHOR_EMAIL” = “incorrect@email” ]; then GIT_AUTHOR_EMAIL=correct@email; GIT_AUTHOR_NAME=”Correct Name”; GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL; GIT_COMMITTER_NAME=”$GIT_AUTHOR_NAME”; fi’ — –all (split across lines for clarity, but not necessary) Be sure to inspect the result when you’re done, … Read more