Tag: git submodules

Git: moving submodules recursively (nested submodules)

I have the following git structure – git-repo a — subdirectory 2015 — git-submodule b — git-submodule c — git-submodule d I would like to move the git submodule c to the folder 2015. I know of “dirty ways” to do this (that involve modifying .git/config and changing gitdir in several of the files in […]

GitPython: how to commit updated submodule

I have been at this for hours now, and although I have a feeling I’m close I can’t seem to figure this out. I’m trying to make a script that takes a git repository, updates a submodule in that repository to a specified version, and commits that change. What works: I can find the repository, […]

How to discard change to git submodule?

I changed the commit pointer of a git submodule: % git status # On branch fix # Your branch is behind ‘origin/fix’ by 1 commit, and can be fast-forwarded. # # Changes not staged for commit: # (use “git add <file>…” to update what will be committed) # (use “git checkout — <file>…” to discard […]

Can't get rid of git submodule

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml only to find, when I tried to edit some of those files, that this was a submodule, so I couldn’t commit changes that I made within the lib/generators/haml directory. Now every time I git status, I get # On branch […]

How do I setup my Git repositories for Android development in Eclipse?

I need some help with properly versioning my Android project with Git/Eclipse. I have no problem setting this up with a single Android project. However, I am trying to figure out the proper and correct way to set this up, if I add one or more third party Android libraries to my main project (e.g. […]

switching between branches where a subdirectory was in the main repo vs. submodularized

We’ve made a subdirectory S into a separate repo and re-added it as a submodule in a branch B. Now when I want to switch back to the original branch A, where the subdirectory was checked into the original repo, git complains that the stuff from the submodule is untracked and has to be moved […]

Ensuring relative Git paths

I’ve moved a Git repository (containing several submodules) to another directory on the local disk. Any git command produces the error: fatal: Not a git repository: <absolute path to .git/modules/*> The error is derived from absolute paths to files encoded in various places[1]. Two questions: Is there a Git command for fixing these paths, i.e., […]

How to properly manage a git repo in a subdirectory, ignored by the parent directory, as its own project?

I am looking to use Vagrant for a development project for laravel. To facilitate this effort, I am using this github project, Laravel4-Vagrant. The vagrant configuration is managed as a git repository. Part of the Vagrant setup has a per-defined www directory which gets mapped to /var/www once the server is setup so you can […]

Understanding git submodule and “freezing” it at a specific commit hash or version

Assuming the following project layout:- mainrepo_git |____ .git |____ .gitmodules |____ proj <——- directory containing the code files for mainrepo |____ 3rdpartysourcecode <– directory containing upstream open source code | |____ .git | |____ 3rdpartyfiles | |____ mainrepofilesanddirectories mainrepo_git contains source code I am directly responsible for. I have read/write access and can push and […]

How to incorporate WordPress automatic updates with Git as version control?

I am trying to find a solution to a very difficult task: properly version controlling WordPress, specifically when working with automatic updates. WordPress allows a lot of simplicity by allowing users to update WordPress core files, themes and plugins by simply clicking a button. But what happens when you have that website under version control […]

Git Baby is a git and github fan, let's start git clone.