I’m new to Git. Lets say, I have two git repositories that have the same library added as submodule: /home/projects/project1/library_XYZ /home/projects/project2/library_XYZ Also lets say, I’m working on the projects and the library simultaneously. When I did changes to the library, lets say in /home/projects/project1/library_XYZ, I would have to push these changes and then pull them […]
What are the conceptual differences between using git submodule and subtree? What are the typical scenarios for each?
Problem: to add files at ./shells/smallApps/* to Git at ./.git/ when I do not have the files at ./.git/info/exclude nor at any .gitignore -files. This question is based on this tread where the problem is not solved completely. I run $git status ~/bin # On branch master nothing to commit (working directory clean) $git ls-files […]
I’ve setup my environment so I can push to a remote bare repository, I used these commands to setup the remote repository: $ mkdir ~/website.git && cd ~/website.git $ git init –bare And $ cat > hooks/post-receive #!/bin/sh GIT_WORK_TREE=/var/www/website git checkout -f $ chmod +x hooks/post-receive And on my local environment: $ git remote add […]
I’d like to create a repo which pulls in a remote repo. For example, let’s say jQuery as a submodule: git://github.com/jquery/jquery.git What would be the process of creating a repo with jQuery as a submodule and adding my own external as a remote repo. Also once this is setup, if I push / pull to […]
I have a project with a Git submodule. It is from an ssh://… URL, and is on commit A. Commit B has been pushed to that URL, and I want the submodule to retrieve the commit, and change to it. Now, my understanding is that git submodule update should do this, but it doesn’t. It […]
How do I replace a git submodule with a different git repo? Specifically, I have a submodule: located at ./ExternalFrameworks/TestFramework that points to a git repo email@example.com:userA/TestFramework.git I’d like it to now point to firstname.lastname@example.org:userB/TestFramework.git. The problem is that when I delete the submodule with the method described here, then re-add it using the command […]
I have a web application that explores other web applications in a particular way. It contains some web demos in a demos folder and one of the demo should now have it’s own repository. I would like to create a separate repository for this demo application and make it a subpackage submodule from main repository […]
The .gitmodule file only specifies the module repository url. How does git submodule know which version to download? It seems to be always checking out the latest version. Then, how does developers ensure compatibility between the main project and the sub modules?
I started a project some months ago and stored everything within a main directory. In my main directory “Project” there are several subdirectories containing different things: Project/paper contains a document written in LaTeX Project/sourcecode/RailsApp contains my rails app. “Project” is GITified and there have been a lot of commits in both “paper” and “RailsApp” directory. […]