GithubHelp home page GithubHelp logo

nbconflicts-demo's Introduction

A simple repo to demonstrate merge conflicts in Jupyter Notebooks

This small repo contains two branches with conflicting changes in code and markdown. Branch main and branch experiment both have edits to the same cells.

You can configure git to use nbdime see instructions for details; here we assume you have already run this command (if you haven't, do it now):

nbdime config-git --enable --global

We will use the VNC desktop viewer to run the graphical merge tool, which is a bit easier to access and control than through JupyterLab.

Once you clone this repository, you will attempt to merge the experiment branch into main with:

git merge origin/experiment

This should fail, giving you a message like:

(base) (main)alpamayo[nbconflicts-demo]> git merge origin/experiment
[W nbmergeapp:55] Conflicts occured during merge operation.
[I nbmergeapp:68] Merge result written to .merge_file_xBrzjl
Auto-merging subplots_demo.ipynb
CONFLICT (content): Merge conflict in subplots_demo.ipynb
Automatic merge failed; fix conflicts and then commit the result.

You will then (in the virtual VNC desktop), run:

git mergetool --tool=nbdime

and proceed with the graphical 3-way merge.

nbconflicts-demo's People

Contributors

fperez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.