Stash with message(-m) and untracked/new(-u) files
# -S, --staged stash staged changes only
# -u, --include-untracked include untracked files in stash
# -a, --all include ignore files
# -m, --message <message> stash message
git stash push -Sm "test message" // only staged changes
Cherry-pick commit from another repo and copy to current repo different folder
cd projectB/
git --git-dir=../projectA/.git format-patch --stdout sha1xxxxxxx | git am --directory='src/subfolder/' -3 -k
Leave a Reply