Branche d'un commit précédent utilisant Git

Mots clés : gitbranchgit-branchgit

meilleur 4 Réponses Branche d'un commit précédent utilisant Git

vote vote

95

git branch branchname <sha1-of-commit> 
git branch branchname HEAD~3 
git checkout -b branchname <sha1-of-commit or HEAD~3> 
vote vote

88

git checkout -b your_new_branch 
git checkout master 
git reset --hard HEAD~x    # in your case, x = 3 
vote vote

73

git checkout <sha1-of-commit> 
git checkout -b <branch_name> 
vote vote

65

git checkout -b <branch-name> <sha1-of-commit> 

Questions similaires