Skip to content
Discussion options

You must be logged in to vote
  • git stash → Temporarily saves uncommitted changes so you can switch branches or work on something else, then restore later with git stash pop.

  • git rebase <branch> → Moves/rewrites commits from one branch onto another, keeping history cleaner than merge.

  • git cherry-pick <commit-hash> → Applies a specific commit from another branch without merging everything.

  • git reset --hard <commit-hash> → Resets your branch to a specific commit (⚠️ careful: it discards changes).

  • git revert <commit-hash> → Creates a new commit that undoes the changes from a specific commit (safer than reset).

  • git log --graph --oneline --all → Visualizes branch history in a nice graph.

  • git diff → Shows change…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stans04lopes-debug
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants