Git repository in a Git repository

You can have nested git repos: The parent repo will simply ignore nested repo. jleedev comments and illustrates with this gist script that the parent repo would track the nested repo state through a gitlink. (gitlink = SHA-1 of the object refering to a commit in another repository. Git links can only be specified by … Read more

Git merge squash repeatedly

Starting with X stable / a—b—c—d—e—f—g development You can use the following steps to copy the last commit from your development branch to your stable branch: git checkout development@{0} # get working tree from “development”, detach HEAD git reset –soft stable # reposition detached HEAD on “stable” git commit # enter the appropriate commit message … Read more

Push Git Project to Local Directory

It is absolutely possible – what you probably want to do is create a “bare” git repository in folder Y (git init –bare) and then add that file location as a remote: git remote add Y file:///path/to/Y I assume GitHub for Mac or Tower for Mac would handle this like any other remote.

Git commit messages lost by vi

You should set vim to not detach from the shell and be in the foreground. You can do this with the following command: git config –global core.editor vim -f From the man: -f Foreground. For the GUI version, Vim will not fork and detach from the shell it was started in. On the Amiga, Vim … Read more

diff branch changes in git relative to common ancestor

After extensively looking at git help rev-parse and experimenting around, I found this piece of information: <rev1>..<rev2> Include commits that are reachable from <rev2> but exclude those that are reachable from <rev1>. When either <rev1> or <rev2> is omitted, it defaults to HEAD. <rev1>…<rev2> Include commits that are reachable from either <rev1> or <rev2> but … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)