User login

Git

If you see every git log entry twice

If you have an unexpectedly long merge time and you see every commit in your git log showing up two times, you or someone else probably changed the history of the repository (such as to remove a big binary file). This changes the commit hash of every commit there is, so when merging these two (actually separate but just happen to have the same code) repositories you'll see them all twice in the history.

Permissions error on git pull

ben@ubuntu:~/code/oa/web$ rake prod vlad:update
(in /home/ben/code/oa)
Everything up-to-date
Already on 'master'
Your branch is ahead of 'agaric/master' by 10 commits.
From git.agaric.com:/srv/git/oa
 * branch            master     -> FETCH_HEAD
error: unable to unlink old 'web/sites/default/default.settings.php' (Permission denied)
Updating 183cb44..744b38c
rake aborted!
execution failed with status 1: ssh oa@sojourner.mayfirst.org cd /var/local/drupal/oa && git checkout master && git pull agaric master

Throw out all local changes to a file with Git

git checkout filename

git apply does not work from within the local checkout of an unrelated git repository

As freshly documented at http://drupal.org/patch/apply

git apply will fail to do anything when used within a local checkout of a git repository (other than the one for the project the patch is made for), such as if you are patching a module that is within a site that is in Git version control. Use patch -p1 < path/file.patch instead.

Automatically deletion of files to commit as well as new and modified files

git add -u

picks up the deleted files, and stages their deletion to be committed.

Also gets modified files. Still needs git add . to pick up the new files.

Syndicate content