The only bit you are missing to properly define vendor/plugins/open_flash_chart_2 as a submodule is a. You can fix this by either making your gitlink into a proper submodule, or by removing the gitlink and replacing it with “normal” content (plain files and directories). What you have is an entry that points to a particular commit, without recording the source repository for that commit. git/config file once the submodule has been initialized). The “source repository” for a gitlink’s commit is specified in the. Submodules are represented as “gitlink” entries gitlink entries only contain the object name (hash) of the HEAD commit of the submodule. Normal directories are represented as tree objects in Git tree objects give names, and permissions to the objects they contain (usually other tree and blob objects-directories and files, respectively). It might be nice if git add would refuse to create such “semi-submodules”. Usually such sub-repositories are ignored, but if you tell git add to explicitly add it, then it will create an gitlink entry that points to the sub-repository’s HEAD commit instead of adding the contents of the directory. The directory vendor/plugins/open_flash_chart_2 starts out as an independent Git repository. Git add vendor/plugins/open_flash_chart_2 You probably did something like this: git clone git:///korin/open_flash_chart_2_plugin.git vendor/plugins/open_flash_chart_2 Effectively you are using the internal feature that git submodule uses (gitlink entries) but you are not using the submodule feature itself. You have added vendor/plugins/open_flash_chart_2 as “gitlink” entry, but never defined it as a submodule. I am a complete newbie at Github and despite trying to go through the documentation, I'm a bit stumped by these particular problems. Pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort: Swap file ".git\.COMMIT_EDITMSG.swp" already exists! This may be unrelated (I include it in case it helps), but every time I type git commit -a rather than my usual git commit -m "my comments", it throws up an error: E325: ATTENTIONįound a swap file by the name ".git\.COMMIT-EDITMSG.swp"įile name: c:/san/project/.git/COMMIT_EDITMSG What do I have to do to get my submodules working so git can start tracking properly? gitmodules in my repository/local directory but couldn't find one. Git status modified: vendor/plugins/open_flash_chart_2 (untracked content) Tried git submodule add git:///korin/open_flash_chart_2_plugin.git vendor/plugins/open_flash_chart_2 vendor/plugins/open_flash_chart_2 already exists in the index gitmodules for path 'vendor/plugins/open_flash_chart_2' Tried git submodule init No submodule mapping found in. Specifically, there's no content and it's showing a green arrow on the folder icon. Here is a simple summary of my latest half hour:ĭiscovered that my Github repo is not tracking my vendor/plugins/open_flash_chart_2 plugin. When I type git add vendor/plugins/open_flash_chart_2 then try git status again, it still says untracked. Modified: vendor/plugins/open_flash_chart_2 (modified content, untracked content) When I run git status, I get: Changed but not updated: I have a folder in my local directory that is untracked. whether they’re committed, staged for commit, or just waiting for you to review them).See below the solid line for my original question. This will give you a quick overview of what changes are made to the files in that directory, as well as the status of those changes (i.e. The best way to do this is by running the “git status” command on your desired directory. When you’re working with git, it’s important to regularly check the status of your project in order to make sure that everything is up-to-date. Because the files are available in the repository in any of the 3 statuses like untracked, no-history, or modified. With the above information, when we run the git status command it also shares the information on the status of the files or changes. Which of your files is actually being tracked by Git?.What are the changes that are present in your staging area?.What changes you’ve made to your working directory?.When we are using the git status command it will share with us information like: What Does the Status Command Actually Tell Us? The status command primarily uses the first two trees these being the working directory and staging area. If you’re not familiar with these concepts, there is more information available on this topic. These are the working directory, staging area, and commit history. From our previous article, we learned that the Git command works with three different trees.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |