Skip to main content
formatting (make <...> show up)
Source Link
torek
  • 498.9k
  • 71
  • 763
  • 888

Since you are saying it is in production, I would recommend you to stash the changes, rather doing the checkout.

Stash helps in saving the changes aside and you will be able to get it back again. I always prefer to stash with a name (helps as a description).

git stash save ""

git stash save "<description>" 

Applying the stash:

git stash apply stash@{0}

git stash apply stash@{0} 

It's better to use apply because the stash will not be deleted.

Listing the stash:

git stash list

git stash list 

Since you are saying it is in production, I would recommend you to stash the changes, rather doing the checkout.

Stash helps in saving the changes aside and you will be able to get it back again. I always prefer to stash with a name (helps as a description).

git stash save ""

Applying the stash:

git stash apply stash@{0}

It's better to use apply because the stash will not be deleted.

Listing the stash:

git stash list

Since you are saying it is in production, I would recommend you to stash the changes, rather doing the checkout.

Stash helps in saving the changes aside and you will be able to get it back again. I always prefer to stash with a name (helps as a description).

git stash save "<description>" 

Applying the stash:

git stash apply stash@{0} 

It's better to use apply because the stash will not be deleted.

Listing the stash:

git stash list 
Source Link
Thiru
  • 2.7k
  • 4
  • 29
  • 41

Since you are saying it is in production, I would recommend you to stash the changes, rather doing the checkout.

Stash helps in saving the changes aside and you will be able to get it back again. I always prefer to stash with a name (helps as a description).

git stash save ""

Applying the stash:

git stash apply stash@{0}

It's better to use apply because the stash will not be deleted.

Listing the stash:

git stash list