How can I move large binaries from main to a git submodule?
I have a bunch of videos inside a directory named "videos". I committed that unfortunately large folder to git, causing git to become very slow for some activities such as cloning. So I did some research and discovered git submodules, but I don't seem to understand them very well.
Here's what I did:
- I created a separate repository just for the videos at ssh://dev.example.org/var/git/project/microsite_videos and put the videos in there.
- I deleted the videos from my main repo at ssh://dev.example.org/var/git/project/microsite and committed the delete. I realize this doesn't remove the videos from history, but I wanted to make sure I understood submodules before I change history.
I added the videos back as a submodule:
git submodule add ssh://dev.example.org/var/git/project/microsite_videos videos
I committed these changes to master.
Here is my .gitmodules file:
path = videos
url = ssh://dev.example.org/var/git/project/microsite_videos
At first it seemed to work OK, but I'm confused about some of its behavior. In particular, just now I merged master into a branch and the videos folder just disappeared. The .gitmodules file is still there, but any attempt to pull or update the videos folder just gives me a new prompt without appearing to do anything.
What am I doing wrong, and how can I improve the my understanding of submodules so I don't have to flounder every time I try to branch and merge?
I have a project with a submodule that is pointing to an invalid commit: the submodule commit remained local and when I try to fetch it from another repo I get: $ git submodule update fatal: reference
I am trying to build gcc 4.7.2 using a custom prefix $PREFIX I have built and installed all the prerequisites into my prefix location, and then successfully configured, built and installed gcc. The pr
I have tried git submodule. Although it can solve my problem of sharing repository in projects, but using submodule has 2 issues that troubles me: The submodule folder need to commit if submodule con
I'm a git newbie, and this is what I currently have: master: A -- B -- C \ \ branch: X -- Y How do I Update commit Y with changes from B and C? Is this simply: git fetch machine master; git merge ma
What I need to do: I have ten commits that are on master. I need to move those commits to a new branch. I have been periodically pulling, but I haven't pushed my work yet. How can I make my ten commit
I would like to change the directory name of a git submodule in my git superproject. Lets suppose I have the following entry in my .gitmodules file: [submodule .emacs.d/vimpulse] path = .emacs.d/vim
We have bunch of repositories on GitHub and we want to switch entirely to another provider. I'm a Mercurial fan so I'm not really familiar with Git branches and unfortunatelly when cloning a git repos
Let's say I have a project(UI) which has a git submodule(Data layer). I'll often change both the submodule and the main git repo. Is it possible to modify files in both and commit them together?
When I roll back my git working directory to a particular commit, the submodule shows as modified. The submodule is checked in and has no modified files, but it's at different commit than it needs t
I ran git config --global core.worktree and it messed up all of my git repos. How can I undo this change? What's the default value for core.worktree and how can I set it up?
I accidentally checked in a wrong submodule update: ( as part of a bigger commit ) -Subproject commit 025ffc +Subproject commit f59250 It is already pushed to the remote.. How do I undo this update?
This question already has an answer here: How to move certain commits to another branch in git? 4 answers I have two branches: develop myFeature I have made a single commit incorrectly while o
I am working on a GIT repository (called A here). It includes a submodule (called B here). When clone a new copy of A by git clone --recursive <repository url for A> A and B are cloned, but the
I just pulled https://github.com/kolanos/kohana-universe and now I'm trying to update all the modules running: git submodule update --init --recursive Some of the repos are wrong or not existent anym
I have a git repo with one submodule. I used the method described here to connect them. Now, I'd like to use filter-branch to check out a specific revision from the submodule for each revision of the
Initially I had the following (simplified) repo structure: MyRepo external1/MySub (git submodule) .gitsubmodules Where $ cat .gitsubmodules [submodule external1/MySub] path = external1/MySub url =
I have a git repo with a dev and a master branch. Now I am trying to use a different revision of a submodule in each branch. So for example I do this: git checkout master cd submodule git checkout v1.
I believe I understand how submodule work, but in my case I don't want to push it to my main repo as a simple reference to the remote repo, I want to push every content in the submodule to my main rep
I have made a 'git commit' followed by a 'git push'. How can I revert that change on both local and remote repositories? $ git log commit 364705c23011b0fc6a7ca2d80c86cef4a7c4db7ac8 Author: Michael Sil
I have a kohana email module(modules/email) as a git submodule in my project and the email module has a git submodule itself(vendors/swiftmailer). When I init the swiftmailer submodule from within the
Ok I know this question has been asked before. But the usual solution is to mark the copy into the workspace checkbox. (Which I believe is not even an option for me because even when I do that I get
As far as I know, the generally accepted practice of adding third party code like d3 is to add it as a git submodule. This reduces the size of the main repo, but I would imagine having d3 (for example
I have this following scenario that keeps coming back: I commit a change in some files, along with an update to a submodule. Someone else commits and pushes an update to the same submodule. git pull
I am trying to clone a git repo that contains submodules onto a Namecheap shared server using SSH. The 'git clone' command worked fine, except that one of my submodules failed. When I try to run 'git
I have cloned a repo that includes a submodule. I know that running git submodule init inserts a reference to the submodule into .git/config, and that running git submodule update pulls the files from
I'm trying to turn a directory into a submodule and effectively turn the thing into a git superproject/project with specialized submodules inside. I have a built directory (necessary for what I'm ma
im really out of idea and im just a beginner in android development, how do I update my ImageView from the service and still able to move around the seekbar. what my current code now do is that when I
I have a large CSV file (7.3GB; 16,300,000 lines), how can I split this file into two files?
I am adding a submodule to my project which contains another git repo. To get the module I ran: git submodule add git://github.com/biakaveron/debug-toolbar.git modules/debug-toolbar Then ran: git sub
How do I remove a Git submodule? By the way, is there a reason I can't simply do git submodule rm whatever ?
Is there a way to change the submodule path to pull from a different repository during build time?
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 $ ca
I want to convert to git an existing codebase which has big binary library files in it. The library files are external (vendor) dependencies. These binaries are only needed to link the final applicati
When I run these steps: mkdir dev cd dev git clone git://github.com/facebook/hhvm.git cd hhvm git submodule init export CMAKE_PREFIX_PATH=`pwd`/.. export HPHP_HOME=`pwd` cd .. url: https://github.com
Is it possible to execute a read inside a git foreach? git submodule foreach 'read -p test; echo $REPLY' does not work at all as the read gets the input from git itself - which is the objname and h
I have a git repot that has a submodule. I want to clone this repo into an eclipse workspace, I've read this Working with Submodules You can read more about what Git submodules are and how they work
I have a headstrong user who stubbornly insists on committing his binaries (executables, DLLs) into our subversion repositories. I'd go in and delete them, but of course nothing is ever really deleted
say that i've been working in master, and i've just realized that maybe my last few commits (say, 15 of them) probably belong on a branch. how do i create a branch, containing all of the commits from
I am using GIT submodules. After pulling changes from server, many times my submodule head gets detached from master branch. Why does it happen? I have to always do git branch git checkout master Ho
When using git log how can I filter by user so that I see only commits from that user?
I am new to Git. I have one main branch development in which all branches will be merged and I'm working on branch TESST123 I have done three commits (using : git commit -am comment) and pushed
How can I get list of branches emerging from any branch in git ? Also what is the difference between fetch and pull command in git ?
The problem I'm trying to build my application in Jenkins, and it is on a private repo on Github, also there's a private submodule. I can clone the private repository in Jenkins by setting up it's cre
I have moved subdirectory in separate repository and then included it as submodule. Now I want to rebase another branch on top of that change. israfel:proj almad$ git rebase -i origin/master error: co
So I started using Git a few days ago. ( Very late to the party - don't scold :) ). Really starting to get comfortable with the basic commands, ideas and workflows. However, submodules are really taki
I am working in a team with a branching strategy that sometimes rewrites the upstream commit history for some of the branches. It would be incredibly useful to be able to move the last N commits from
Let's say I have 3 git repositories, each with a lib and tests folder in the root. All 3 repositories are part of what I want to be a single package, however it is important to me to keep the reposito
In Quality Center, I want to move a test run with Passed/Failed status from one test set to another, copying its run history as well. Please help, how can i do that.
On one machine (IP address 192.168.1.2), I create a Git repository by $ cd /home/hap/working $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit' And I have another machine on t
I want to install the RestKit for my project but in the first step when I want to add git submodule by using Terminal it gives me this error: command not found Here is the code that I input: $ cd /p