“Git Checkout zuvor Commit” Code-Antworten

Wie kann man dauerhaft wieder zu früheren Lit in Git zurückkehren

# This will destroy any local modifications.
# Don't do it if you have uncommitted work you want to keep.
git reset --hard 0d1d7fc32

# Alternatively, if there's work to keep:
git stash
git reset --hard 0d1d7fc32
git stash pop
# This saves the modifications, then reapplies that patch after resetting.
# You could get merge conflicts, if you've modified things which were
# changed since the commit you reset to.
pirateksh

Git Checkout Commit

git checkout <commit>
Pushy Pants

Reverting Commit Git

git revert <commit hash>
Common Mynah

Git Checkout zuvor Commit

git reset --hard HEAD~10
To rollback 10 commits back:
Smoggy Skipper

Git ziehen aus dem vorherigen Commiting

git checkout -b old-state 0d1d7fc32
Yellowed Yacare

Git Checkout zuvor Commit

$ git reset --hard <commit_id>
Naimur

Ähnliche Antworten wie “Git Checkout zuvor Commit”

Fragen ähnlich wie “Git Checkout zuvor Commit”

Weitere verwandte Antworten zu “Git Checkout zuvor Commit” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen