How do i see the differences between a previous git commit and what you are about to commit?



  • Man page git-add.

    also see:
    Man page git-diff.

    -p, --patch
    	   Interactively choose hunks of patch between the index and the work tree and add them
    	   to the index. This gives the user a chance to review the difference before adding
    	   modified contents to the index.
    
    	   This effectively runs add --interactive, but bypasses the initial command menu and
    	   directly jumps to the patch subcommand. See “Interactive mode” for details.
    

    git-add.png

    The command will run through each of the changes Prompting for action to be applied.

    $ git add -p
    

Log in to reply
 

© Lightnetics 2024