Git submodule add: “a git directory is found locally” issue
I'm actually trying to learn how to use git, including the "git submodule" subcommands. I already set up a server on which I can host, push and pull git depositories by using ssh. I created on this server a main git repository "Travail" in wich I would like to put all my projects as submodules.
In my Travail repository, I already added a project of mine as a submodule at
tools/libft : I'm able to develop this submodule, to push and to pull it.
But when I try to add an other submodule (named fdf, from fdf.git on my server), I get the following issue :
git submodule add ssh://XXX.XXX.XXX.XXX:XXXXX/opt/git/fdf.git projets/fdf
A git directory for 'projets/fdf' is found locally with remote(s):
If you want to reuse this local git directory instead of cloning again from
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.
There is actually no subdirectory in
I read on an other thread that I should use git submodule sync or edit the .gitmodules file in which the URL to my submodule's origin repository could have changed.
But my .gitmodules file only contains the informations about my first submodule (tools/libft), not about projets/fdf :
path = tools/libft
url = ssh://git@XXX.XXX.XXX.XXX:XXXXX/opt/git/libft.git
As a French student I could have missed something in the english documentation I have, but I searched and I really don't understand why I get this issue.
I would be glad if I would get a solution but just an explanation would be helpfull too. I thank you for your help and I apologize for my possible spelling mistakes.
I have an issue in git stash. Say for example I have 3 files say a.txt,b.txt & c.txt in the repo and the directory is clean. Now I'm modifying 2 files among them : a.txt and b.txt. Now I havent co
I want to remove a git submodule. I found another question that answers how to do it but I had questions about the process. In my knowledge, removing the reference from .gitmodules should remove it f
I did find an old question that answers this to some extent, but it's not entirely helpful as it stands: how can I find out if a git submodule has new commits Mostly I was hoping that git has changed
We are using Qooxdoo framework in our application. For now, it's copy is stored in our Git repository in the root folder qooxdoo. We have decided to replace that with submodule pointing directly to
I am stuggling to understand how to set this up correctly. I want to be able to have a test site and a production site and use git to manage it. my current file system looks like this (production is i
I have a problem when working with git submodules. Whenever i receive a new submodule reference from the upstream repository, executing git submodule update gives the following result: fatal: referenc
So I've been using git submodules, and when I get more than 3 layers deep I start getting bad objects. Directories aren't exceeding 200 characters. I get the following errors: user@USER-LT /C/Dev/Act
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
My project has multiple git submodules. I need the SHA commit of one submodule in particular to present in the app. git submodule foreach accepts a command like rev-parse, but it loops over all submod
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 have, for the last year, TouchJSON via a submodule. I no longer need to use the library and want to remove it but I am not sure if doing this: How do I remove a git submodule? will remove even the '
How do I limit the output of: git add . -A -n to the present directory only? E.g. something like: git add . -A -n --depth=0 I am currently at the base directory of my project and want to see files t
Sometimes when I want to git add . I get this message which is quite annoying: warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with r
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
This question already has an answer here: Remove a Git submodule? 16 answers I have a subproject in a Git repo that I want to remove but am not able to. On the GitHub web interface the submodul
I'm trying to use Git for the first time. I did everything that github instructions said to do, but when I got to: git push -u origin master I typed: /Users/name/Documents/Xcode.app/Contents/Devel
I'm getting a hang of git submodule (wishful thinking?) and I'm coming up with more specific questions, which is a good sign... I've tried to find the which revision of the submodule the superproject
I have a git repository (which I'll refer to as ml) located at ssh://ml-fey/usr/projects/data/nuclear/mc/type1 This repository has a submodule. The .gitmodules file looks like this [submodule Append
I have a really weird, bad scenario here. Disclaimer, I'm new to git, and I've kind of screwed up. SO I have lots of submodules in my fork, based on monodevelop. First: I couldn't even update my submo
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
Git isn't correctly ignoring a bin folder of one of my submodules. Any ideas why? Here is git status in the submodule: MBPR:$ git status # On branch master # Untracked files: # (use git add <file
I'm using Xcode 4's built-in Git functionality, and I am pushing my commits to a remote repository. However, the code files are in one directory (~/users/me/projects/theproject) and the images are in
here is the situation i faced. I have a repo containing a submodule. In the repo, i created a new branch to do some editing. Then i found out i need an updated submodule, so i pulled down the submodu
We have a jRuby frontend (maintained using git) integrated with a Scala backend (maintained using Artifactory). The backend jar files are located in /lib/jars. As of now, whenever a jar is updated, we
Whenever I use submodules in git find myself doing git submodule init git submodule update What's the logic in two commands when you basicly do those commands every time?
Is there a command a way or a script that can let me export all the ignored git directories and files in my .gitignore file to a folder of my choice preserving the directory structure? I can get the w
I have a project in a git repository, with a git submodule. I made changes to both the project and the submodule, and committed the project. Apparently I was supposed to commit the submodule first, th
I've used git for quite a bit now but stayed away from submodules since I didn't had a good reason to use them. However, recently I began a project which clearly needs to use this feature of git. Howe
I've created a git repository with a submodule in it. I'm able to tell the submodule itself to change its remote repository path, but I'm not sure how to tell the parent repository how to change the r
I need delete file from filesystem which is tracked by Git repository and I want leave that file in Git repository unchanged (no commit to repo). It's easy for locally modified file where I'm using as
If I modify a submodule, can I push the commit back to the submodule origin, or would that require a clone? If clone, can I store a clone inside another repository?
I'm trying to use git submodules for aggregating 10+ repositories into one structure for easy development. It is supposed to clone the module and checkout a branch. Instead, the module is checked out
I was pretty happy when I found out lately about git submodule summary which shows me nicely by which commits the checked out commit of a submodule is ahead or behind the reference in the repository.
I have a git repository consist of several git submodules. If I want to update submodules of working repository, it involve: cd git pull origin master cd .. git add git commit -m Updated submodule
I have a project where I added a git submodule to a fork of a repo that is out of date. Rather than pointing to that fork, I decided to change the submodule reference to point to the original repo ins
I'd like to create a new repository as a submodule of my project. Usually, I create a Github repo and then add it as a submodule using the command git submodule add url_to_repo.git Is there a way to c
I have a git project (repo1) including a single submodule (repo2). What I would like to achieve is to tag my project using an older commit of my submodule (like HEAD - 3). I tried with a checkout of t
I'm using TortoiseGit with msysGit installed with the msysGit-fullinstall-1.6.4-preview20090729.exe and it works in a very strange way: on the About windows it says it can't find git, even if all the
Assuming the following project layout:- mainrepo_git |____ .git |____ .gitmodules |____ proj <------- directory containing the code files for mainrepo |____ 3rdpartysourcecode <-- directory cont
I have a git submodule (a vim plugin from github) which is already inside a git repository, and has been for 10 commits or so. I would now like to fork the submodule repo and make my own changes. I
Is it possible to change the default/root directory of where git looks for projects so you can clone a project like this: git clone email@example.com:project.git rather than like this: git clone git@m
I have a modified file in a Git working directory which I want to discard. This file is not in a submodule. I tried 3 different commands and nothing helped. git checkout -- <file>, or git check
What is the difference between running git submodule update --remote vs cd <submodule directoy> git pull Assuming that the submodule was previously set to track some branch: git submodule ad
I am following the symfony2 tutorial http://www.slideshare.net/weaverryan/symfony2-get-your-project-started. On slide 22 i must perform a git add . I have github open and have a public repository hell
I get the following error when I try adding a submodule to my repository: fatal: pathspec 'submodule' did not match any files I had some issues with my submodules so I had to remove them all (remove
I created some repository in Git and added repos as submodules. In the submodule repo i added contents.( folders and files).After that i did git add -A git commit -m message git push origin master.
This question already has an answer here: Git commit to common submodule (master branch) 1 answer I have, in my naivety, set up a git submodule and treated it like a Subversion external - i.e.
I use composer to install FOSUserBundle in Symfony2, I can't add the bundle to my project git repository. I found in FOSUserBundle there has a .git directory and has its own config. When I use git add
I'm trying to update automatically my submodule located in var/www/php/vendor/projectX at each commit to the var/www super-project. I added these lines in the .git/hooks/post-receive file : #!/bin/sh
I'm not clear on what the following means (from git submodule update docs): ...will make the submodules HEAD be detached, unless --rebase or --merge is specified... How does --rebase/--merge chang