Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8405659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:53:55+00:00 2026-06-09T22:53:55+00:00

When I try to git pull in my branch, I get: error: Your local

  • 0

When I try to git pull in my branch, I get:

error: Your local changes to the following files would be overwritten by merge:
    Vendor/JSONKit

Indeed, when I do a git status, it says Vendor/JSONKit is “modified”.

Vendor/JSONKit contains a third-party project called JSONKit (https://github.com/johnezang/JSONKit). I’ve never touched this code. I didn’t set up the folder, either — but I gather that it’s what’s called a “submodule”.

What is causing this error and how do I get past it? If I try to git stash, it claims I have “No local changes to save.” If I go into Vendor/JSONKit and try to do anything, git says I’m not on a branch anymore.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:53:56+00:00Added an answer on June 9, 2026 at 10:53 pm

    In a single repository:

    You should be able to explore the diff with git diff -- Vendor/JSONKit, but if you want to just reset the file (and abandon the changes), issue this command:

    git checkout HEAD -- Vendor/JSONKit
    

    That’ll checkout the most recent version of Vendor/JSONKit in your working directory and abandon the modifications.


    In a repository with submodules:

    Git submodules allow you to embed git repositories inside one another. Suppose “JSONKit” were a submodule inside “MyApp”. The top-level git repository, MyApp, only tracks the HEAD commits of JSONKit, so you can perfectly reconstruct both MyApp‘s and JSONKit‘s states at any point in history.

    Suppose you committed changes inside the JSONKit repository. Inside JSONKit, this would look like a normal diff and have a normal history. Inside the parent repository, MyApp, it would register as a change to the HEAD commit. It might look something like this diff, taken from the git scm docs. The submodule in this example is a directory called “rack”.

    $ git diff --cached rack
    diff --git a/rack b/rack
    new file mode 160000
    index 0000000..08d709f
    --- /dev/null
    +++ b/rack
    @@ -0,0 +1 @@
    +Subproject commit 08d709f78b8c5b0fbeb7821e37fa53e69afcf433
    

    How does MyApp know which directories are submodules? It’s tracked inside the .gitmodules file. cat it, and you’ll see every submodule registered in MyApp:

    $ cat .gitmodules 
    [submodule "rack"]
        path = rack
        url = git://github.com/chneukirchen/rack.git
    

    When you issued git submodule update, you told git to checkout the most recent HEAD commit for JSONKit in your parent repo’s index, thus abandoning the change in the submodule repository:

    update
       Update the registered submodules, i.e. clone missing submodules and checkout the commit specified in the index of the containing repository. This will
       make the submodules HEAD be detached unless --rebase or --merge is specified or the key submodule.$name.update is set to rebase, merge or none.  none
       can be overridden by specifying --checkout.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get following error message, when I try to run git rebase -i for
My problem is related to Fatal Git error when switching branch . I try
I am having issue with git pull.I have commited my changes in local repo.
Here is my try : #!/Usr/bin/emacs --script (let ((default-directory /home/vision)) (shell-command git pull;) but
I am using git in my projects, whenever I try to pull from Xcode
What would possibly cause a 'git push' to try and commit to two branches?
I did this: git branch --track stats_page to create a separate branch to try
I installed Msys Git and TortoiseGIT x64. Whenever I try to use the Get
$ git branch master * portal $ git fetch $ git merge origin/portal Already
I have a local branch that I created via git branch --track <localFeatureBranch> <remoteSVNBranch>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.