How do I “git clone” a repo, including its submodules?

With version 2.13 of Git and later, –recurse-submodules can be used instead of –recursive: git clone –recurse-submodules -j8 git://github.com/foo/bar.git cd bar Editor’s note: -j8 is an optional performance optimization that became available in version 2.8, and fetches up to 8 submodules at a time in parallel — see man git-clone. With version 1.9 of Git … Read more

View already-committed Git merge in external 3-way diff tool

Updated answer: My original version of the script below was flawed in the sense that $conflicting_files in fact did not contain only the files that really had conflicts, but all files that were changed in both parent branches (but not necessarily had conflicts). Also, it was not using “the configured merge tool” as advertized in … Read more

What are the pros and cons of using a trunk-based Vs feature-based workflow in Git? [closed]

Your reference 1 already discuss some points about code-review. This answer is primarily based on my experience at work with the Gerrit tool and trunk-based workflow. How would code-review be done? In feature-based model is easy: into the feature branch. In the trunk-based model, since all the commits are published in master, how can I … Read more

Git clone in windows much slower than in linux

Problem solved. Open command prompt as administrator and run the following commands: netsh interface tcp show global netsh interface tcp set global autotuninglevel=normal netsh interface tcp show heuristics netsh interface tcp set heuristics disabled Do not forget to restart the computer in the end. The cause was auto tuning was set to disabled for some … Read more

git add –patch with difftool

No, unfortunately. I suppose I can see that working – Git generates a temporary file based on what’s currently in the index, hands it to the difftool along with a copy of the current work tree version (to protect you from making further changes), lets you use the difftool to move some of the changes … Read more

How can I use git-archive to include submodules from a bare repository?

Based on answers and comments here. You can create non-bare repo and run: git ls-files –recurse-submodules | tar caf ../prog.tar.gz -T- To handle files starting with hypen, use –verbatim-files-from To put files in folder inside the archive, use –xform s:^:prog/: Full version: git ls-files –recurse-submodules | tar caf ../prog.tar.gz –xform s:^:prog/: –verbatim-files-from -T-

How can you add commits to a github pull request of another person to your repo if you can’t commit to their branch?

There are a number of workflows you can use here. Some examples are: Comment on the pull request, and have Bob make some changes. See Pull Request Discussion for more info. Merge the pull request onto a different branch, then make your changes before merging to master. You need to do this from the command … Read more

What exactly is the git:// protocol?

The git protocol is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication. It was introduced at the very beginning of Git, in commit 2386d65 (July 2005, Git 0.99.1) Add first cut at “git protocol” … Read more

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