4 ms·
Here's an alternative that appears to accomplish the same thing: # checkout feature branch git switch feature # reset HEAD while preserving changes to w
by chmaynard 6y ago
Here's an alternative that appears to accomplish the same thing:
# checkout feature branch
git switch feature
# reset HEAD while preserving changes to working tree
# commits on feature branch will become orphans
git reset --soft main
# commit all changes on feature branch
git add -A; git commit -m <feature description>
# checkout the main branch and merge
git switch main
git merge feature
- globular-toast 6y agoYes. There are many ways to achieve the same thing with git.