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 4.1k 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

      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 Reply Quote 0
      • KristjanESPERANTOK Offline
        KristjanESPERANTO Module Developer @1a2a3a
        last edited by KristjanESPERANTO

        @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 Reply Quote 0
        • S Away
          sdetweil @1a2a3a
          last edited by

          @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 Reply Quote 0
          • 1 Offline
            1a2a3a @sdetweil
            last edited by

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

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

            KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
            • KristjanESPERANTOK Offline
              KristjanESPERANTO Module Developer @1a2a3a
              last edited by KristjanESPERANTO

              @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 Reply Quote 0
              • 1 Offline
                1a2a3a @KristjanESPERANTO
                last edited by

                @KristjanESPERANTO thanks, that fixed it now!

                1 Reply Last reply Reply Quote 1
                • S Away
                  sdetweil @KristjanESPERANTO
                  last edited by

                  @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

                  KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
                  • KristjanESPERANTOK Offline
                    KristjanESPERANTO Module Developer @sdetweil
                    last edited by

                    @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
                    • First post
                      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