How to use git stash

How to use git stash

August 7, 2023

Here’s the sequence to follow when using git stash:

  1. Save changes to branch A.
  2. Run git stash.
  3. Check out branch B.
  4. Fix the bug in branch B.
  5. Commit and (optionally) push to remote.
  6. Check out branch A
  7. Run git stash pop to get your stashed changes back.

Listing your stashes

git stash list

 

Leave A Comment

Avada Programmer

Hello! We are a group of skilled developers and programmers.

Hello! We are a group of skilled developers and programmers.

We have experience in working with different platforms, systems, and devices to create products that are compatible and accessible.