How to configure “git pull –ff-only” and “git merge –no-ff”

That shouldn’t be the case, according to the git-config man page on pull.ff: (…) When set to only, only such fast-forward merges are allowed (equivalent to giving the –ff-only option from the command line). This setting overrides merge.ff when pulling. The configuration pull.ff has been introduced in Git 2.x, so it won’t work as expected … Read more

git squash commits while retaining author’s info

You can achieve something like this by using commit message conventions. Most git clients support this, including GitHub. Specifically, add something like this to the end of your commit message: Co-authored-by: John Smith <[email protected]> You can have multiple co-authors by including this line multiple times.

When and how does git use deltas for storage?

Git only uses deltas in “packfiles”. Initially, each git object is written as a separate file (as you found). Later, git can pack many objects into one file, called a “pack file”. The pack file is then compressed, which automatically exploits any repetitions between the files in the packfile (or repetitions inside files). This packing … Read more

Meaning of leading slash in `.gitignore` file

This is the documentation text: A leading slash matches the beginning of the pathname. For example, “/*.c” matches “cat-file.c” but not “mozilla-sha1/sha1.c”. These are my guesses: If you use an in-repository-.gitignore, the directory in which the .gitignore is located – it is not really useful to make it relative to the repository root. A short … Read more

Is it safe to use a copied git repo?

It is safe. The difference in using “git clone” is that it automatically sets up the origin repository, so that you can easily use “git pull” and “git push” to synchronize the two repositories. Also “git clone” does not copy the logs, index and other configuration that is local to a repository. It only copies … Read more

Git svn clone: How to defer fetch of revision history

I found out how it can be done. The trick is not to use git svn clone. Instead, use git svn init and git svn fetch individually. Modified the example: URL=http://google-web-toolkit.googlecode.com/svn/trunk/ REV=`svn info $URL |grep Revision: | awk ‘{print $2}’` PROJECT_FOLDER=google-web-toolkit-readonly mkdir $PROJECT_FOLDER cd !$ #goes into dir named $PROJECT_FOLDER git svn init -s $URL … Read more

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