Answers for "git use stash on another computer"


git use stash on another computer

# 1. Stash current changes
 git stash

# 2. Create stash as patch (0 is the index of the stash)
# If you have multiple stashes, you can use >> to append the next
# stash to the same file
# e.g. .. "stash@{1}" -p >> changes.patch
# .. "stash@{2}" -p >> changes.patch. etc..

 git stash show "stash@{0}" -p > changes.patch

# 3. Apply patch

git apply changes.patch
Posted by: Guest on April-08-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language