Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Advanced Git operations, from Stashing changes with git stash, and Tagging releases with git tag to Cherry-picking with git cherry-pick, Undoing commits with git revert and git reset.
The following is a quick guide of Advanced Git Topics. These include: Stashing changes with git stash, Tagging releases with git tag, Cherry-picking with git cherry-pick, Undoing commits with git revert and git reset.
Note: This article is about Git’s advanced topics and commands. For a General and introductory Git tutorial you can go to: Git tutorial: Version control from the ground up.
git stash
)
git stash
# Switch branch, do some work, come back
git stash pop
Temporarily saves uncommitted changes so you can switch contexts.
git tag
)
git tag v1.0.0
git push origin v1.0.0
Marks important points in history, like version releases.
git cherry-pick
)
git cherry-pick abc123
Applies the changes from a specific commit to your current branch.
git revert
& git reset
)git revert: Creates a new commit that undoes a specific commit.
git revert abc123
git reset: Resets your branch to a previous commit.
git reset --hard abc123
(Use cautiously in shared repos.)