How to save changes?

To save changes in Git, you can use the git stash command. Here are the steps:

  1. Stash your changes:

    • To create a new stash, run:
      git stash save
    • If you want to include untracked files, use:
      git stash save -u
    • You can also add a message to your stash:
      git stash save "My changes"
  2. Apply the stash later:

    • When you're ready to continue working on your changes, you can apply the latest stash with:
      git stash apply

This allows you to temporarily save your work and switch branches without losing any changes.

0 Comments

no data
Be the first to share your comment!