• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

unable to git pull successfully

Scheduled Pinned Locked Moved Solved Troubleshooting
7 Posts 3 Posters 3.7k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1a2a3a
    last edited by Mar 18, 2024, 2:18 PM

    hi

    trying to update my googlephotos and am facing the error.

    error: Your local changes to the following files would be overwritten by merge:
    package-lock.json
    Please commit your changes or stash them before you merge.
    error: The following untracked working tree files would be overwritten by merge:
    .vscode/settings.json
    types/google-photos.d.ts
    types/type.d.ts
    Please move or remove them before you merge.

    so i managed to git checkout package-lock.json.

    but when i tried to git checkout .vscode/settings.json, i got the error error: pathspec ‘.vscode/settings.json’ did not match any file(s) known to git. same goes for the types/google-photos.d.ts and types/type.d.ts

    what should i do next?

    S 1 Reply Last reply Mar 18, 2024, 3:17 PM Reply Quote 0
    • K Offline
      KristjanESPERANTO Module Developer @1a2a3a
      last edited by KristjanESPERANTO Mar 19, 2024, 8:27 AM Mar 19, 2024, 7:50 AM

      @1a2a3a If you want to reset the module without saving your local changes, you can do this in the module’s directory:

      git fetch origin master
      git reset --hard origin/master
      git pull
      
      1 S 2 Replies Last reply Mar 19, 2024, 9:49 AM Reply Quote 0
      • S Away
        sdetweil @1a2a3a
        last edited by Mar 18, 2024, 3:17 PM

        @1a2a3a said in unable to git pull successfully:

        error: Your local changes to the following files would be overwritten by merge:
        package-lock.json

        this file is regenerated by npm install, so just erase it

        rm package-lock.json

        but… these make no sense

        error: The following untracked working tree files would be overwritten by merge:
        .vscode/settings.json
        types/google-photos.d.ts
        types/type.d.ts
        Please move or remove them before you merge.
        

        as they are untracked, git doesn’t do anything with them…

        but I see search results for that problem…

        looks like you were developing in the module folder… so
        you SHOULD be able to stash those files (hide them)
        one suggestion (afer erasing the package-lock.json)

        git add * 
        git stash
        git pull
        

        after the pull,

        git stash pop
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 1 Reply Last reply Mar 19, 2024, 5:05 AM Reply Quote 0
        • 1 Offline
          1a2a3a @sdetweil
          last edited by Mar 19, 2024, 5:05 AM

          @sdetweil did as per your mentioned but still stuck with .vscode/setting.json

          2f495b66-7df8-44b5-b210-8306a19e785e-image.png

          K 1 Reply Last reply Mar 19, 2024, 7:50 AM Reply Quote 0
          • K Offline
            KristjanESPERANTO Module Developer @1a2a3a
            last edited by KristjanESPERANTO Mar 19, 2024, 8:27 AM Mar 19, 2024, 7:50 AM

            @1a2a3a If you want to reset the module without saving your local changes, you can do this in the module’s directory:

            git fetch origin master
            git reset --hard origin/master
            git pull
            
            1 S 2 Replies Last reply Mar 19, 2024, 9:49 AM Reply Quote 0
            • 1 Offline
              1a2a3a @KristjanESPERANTO
              last edited by Mar 19, 2024, 9:49 AM

              @KristjanESPERANTO thanks, that fixed it now!

              1 Reply Last reply Reply Quote 1
              • S Away
                sdetweil @KristjanESPERANTO
                last edited by Mar 19, 2024, 2:56 PM

                @KristjanESPERANTO but why does this fix the problem of untracked files blocking pull? if they are untracked, they are not in the repo… I have never seen this happen

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                K 1 Reply Last reply Mar 19, 2024, 4:11 PM Reply Quote 0
                • K Offline
                  KristjanESPERANTO Module Developer @sdetweil
                  last edited by Mar 19, 2024, 4:11 PM

                  @sdetweil With git reset ... everything is reset hard, this fixes the problem, but does not help to explain it. I haven’t fully understood myself why git pull didn’t worked after git stash.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    1/7
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy