Skip to content

Instantly share code, notes, and snippets.

@szemate
Last active May 5, 2025 07:32
Show Gist options
  • Save szemate/6fb69c8e3d8cce3efa9a6c922b337d98 to your computer and use it in GitHub Desktop.
Save szemate/6fb69c8e3d8cce3efa9a6c922b337d98 to your computer and use it in GitHub Desktop.

Revisions

  1. szemate revised this gist Jul 27, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    git add --update
    git commit
    ```
    :warning: Make sure not to commit the `*.orig` files! **DO NOT** use `git add .`!!!
    :warning: Make sure not to commit the `*.orig` files!
    1. If everything looks fine, push to GitHub:
    ```
    git push
  2. szemate revised this gist Jun 30, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open your editor (e.g. VSCode) and:
    * Carefully resolve any conflict in `package.json` (if there is any)
    * Carefully resolve conflicts in `package.json` (if there is any)
    * **Ignore** the conflicts in `package-lock.json`
    1. Install packages, which will re-generate `package-lock.json`:
    ```
  3. szemate revised this gist Jun 30, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -20,8 +20,8 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open your editor (e.g. VSCode) and:
    * Carefully resolve any conflict in `package.json`
    * Ignore the conflicts in `package-lock.json`
    * Carefully resolve any conflict in `package.json` (if there is any)
    * **Ignore** the conflicts in `package-lock.json`
    1. Install packages, which will re-generate `package-lock.json`:
    ```
    npm install
  4. szemate revised this gist Jun 30, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    git add --update
    git commit
    ```
    Make sure not to commit the `*.orig` files! **DO NOT** use `git add .`!!!
    :warning: Make sure not to commit the `*.orig` files! **DO NOT** use `git add .`!!!
    1. If everything looks fine, push to GitHub:
    ```
    git push
  5. szemate revised this gist Jun 30, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    git add --update
    git commit
    ```
    (Make sure not to commit the `*.orig` files!)
    Make sure not to commit the `*.orig` files! **DO NOT** use `git add .`!!!
    1. If everything looks fine, push to GitHub:
    ```
    git push
  6. szemate revised this gist Jun 30, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -2,12 +2,12 @@

    It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

    1. Update the `main` branch with the latest changes:
    1. Update the `master` branch with the latest changes:
    ```
    git checkout main
    git checkout master
    git pull
    ```
    1. Merge your feature branch into `main`:
    1. Merge your feature branch into `master`:
    ```
    git merge mybranch
    ```
  7. szemate revised this gist Mar 17, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    npm install
    ```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly.
    1. If the application is starting (i.e. there are no missing dependencies), add all changes and finish the merge:
    1. If the application is able to start up (i.e. there are no missing dependencies), add all changes and finish the merge:
    ```
    git add --update
    git commit
  8. szemate revised this gist Mar 17, 2022. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -26,10 +26,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    ```
    npm install
    ```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly:
    ```
    npm start
    ```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly.
    1. If the application is starting (i.e. there are no missing dependencies), add all changes and finish the merge:
    ```
    git add --update
  9. szemate revised this gist Mar 17, 2022. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -20,12 +20,16 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open your editor (e.g. VSCode) and:
    * Carefully resolve any conflict in `package.json`.
    * Ignore the conflicts in `package-lock.json`.
    * Carefully resolve any conflict in `package.json`
    * Ignore the conflicts in `package-lock.json`
    1. Install packages, which will re-generate `package-lock.json`:
    ```npm install```
    ```
    npm install
    ```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly:
    ```npm start```
    ```
    npm start
    ```
    1. If the application is starting (i.e. there are no missing dependencies), add all changes and finish the merge:
    ```
    git add --update
  10. szemate revised this gist Mar 17, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ It is not possible to resolve conflicts of package-lock.json in GitHub's merge t
    CONFLICT (content): Merge conflict in package.json
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open VS code and:
    1. Open your editor (e.g. VSCode) and:
    * Carefully resolve any conflict in `package.json`.
    * Ignore the conflicts in `package-lock.json`.
    1. Install packages, which will re-generate `package-lock.json`:
  11. szemate revised this gist Mar 17, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # How to resolve package-lock.json conflicts

    It is not possible to resolve conflicts of package-lock.json in GitHub and you need to do a manual merge.
    It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

    1. Update the `main` branch with the latest changes:
    ```
  12. szemate revised this gist Mar 17, 2022. 1 changed file with 27 additions and 27 deletions.
    54 changes: 27 additions & 27 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -3,36 +3,36 @@
    It is not possible to resolve conflicts of package-lock.json in GitHub and you need to do a manual merge.

    1. Update the `main` branch with the latest changes:
    ```
    git checkout main
    git pull
    ```
    ```
    git checkout main
    git pull
    ```
    1. Merge your feature branch into `main`:
    ```
    git merge mybranch
    ```
    You will see something like the following message:
    ```
    Auto-merging package-lock.json
    CONFLICT (content): Merge conflict in package-lock.json
    Auto-merging package.json
    CONFLICT (content): Merge conflict in package.json
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    ```
    git merge mybranch
    ```
    You will see something like the following message:
    ```
    Auto-merging package-lock.json
    CONFLICT (content): Merge conflict in package-lock.json
    Auto-merging package.json
    CONFLICT (content): Merge conflict in package.json
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open VS code and:
    * Carefully resolve any conflict in `package.json`.
    * Ignore the conflicts in `package-lock.json`.
    * Carefully resolve any conflict in `package.json`.
    * Ignore the conflicts in `package-lock.json`.
    1. Install packages, which will re-generate `package-lock.json`:
    ```npm install```
    ```npm install```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly:
    ```npm start```
    ```npm start```
    1. If the application is starting (i.e. there are no missing dependencies), add all changes and finish the merge:
    ```
    git add --update
    git commit
    ```
    (Make sure not to commit the `*.orig` files!)
    ```
    git add --update
    git commit
    ```
    (Make sure not to commit the `*.orig` files!)
    1. If everything looks fine, push to GitHub:
    ```
    git push
    ```
    ```
    git push
    ```
  13. szemate created this gist Mar 17, 2022.
    38 changes: 38 additions & 0 deletions package-lock-conflicts.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # How to resolve package-lock.json conflicts

    It is not possible to resolve conflicts of package-lock.json in GitHub and you need to do a manual merge.

    1. Update the `main` branch with the latest changes:
    ```
    git checkout main
    git pull
    ```
    1. Merge your feature branch into `main`:
    ```
    git merge mybranch
    ```
    You will see something like the following message:
    ```
    Auto-merging package-lock.json
    CONFLICT (content): Merge conflict in package-lock.json
    Auto-merging package.json
    CONFLICT (content): Merge conflict in package.json
    Automatic merge failed; fix conflicts and then commit the result.
    ```
    1. Open VS code and:
    * Carefully resolve any conflict in `package.json`.
    * Ignore the conflicts in `package-lock.json`.
    1. Install packages, which will re-generate `package-lock.json`:
    ```npm install```
    1. "Test drive" your application to make sure the conflicts in `package.json` have been resolved correctly:
    ```npm start```
    1. If the application is starting (i.e. there are no missing dependencies), add all changes and finish the merge:
    ```
    git add --update
    git commit
    ```
    (Make sure not to commit the `*.orig` files!)
    1. If everything looks fine, push to GitHub:
    ```
    git push
    ```